Skip to content

Instantly share code, notes, and snippets.

View Bachsau's full-sized avatar

Bachsau

View GitHub Profile
@alanzeino
alanzeino / new-mac.md
Last active March 11, 2025 17:04
New Mac Setup

All the stuff I do to set up a new Mac

Applications

  • 1Password (hijacks the Snippety window)
  • AirBuddy
  • Amphetamine
  • BlockBlock
  • Cork (much better than Brewer X)
  • CotEditor (fastest text editor with multi–line editing)
  • DaisyDisk
  • Fantastical
@leodutra
leodutra / windows-10-git.md
Last active January 23, 2025 09:36
Enable long paths on Windows 10 and Git

If you run Windows 10 Home Edition you could change you Registry to enable Long Paths.

Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem in regedit and then set LongPathsEnabled to 1.

If you have Windows 10 Pro or Enterprise you could also use Local Group Policies.

Go to Computer Configuration > Administrative Templates > System > Filesystem in gpedit.msc, open Enable Win32 long paths and set it to Enabled.

git config --system core.longpaths true
@apisandipas
apisandipas / share-urls.md
Last active March 31, 2025 07:50 — forked from chrisl8888/drupal-views-share-global-text-field
Share url's for Facebook, Twitter, Pinterest and Linkedin with just get variables

Creating share buttons with just URL's

Twitter

http://twitter.com/share?text=<TITLE>&url=<URL>

E.g. http://twitter.com/share?text=This+is+google+a+search+engine&url=https%3A%2F%2Fwww.google.com

Facebook

http://www.facebook.com/sharer.php?u=&amp;p[title]=

@Jc2k
Jc2k / .bash_profile
Last active March 24, 2024 14:42
GPG Cheat Sheet
if [ -f "${HOME}/.gpg-agent-info" ]; then
. "${HOME}/.gpg-agent-info"
export GPG_AGENT_INFO
export SSH_AUTH_SOCK
export SSH_AGENT_PID
fi
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import requests
import struct
import uuid
def java_uuid_hash_code(uuid):
leastSigBits, mostSigBits = struct.unpack('>QQ', uuid.bytes)
l1 = leastSigBits & 0xFFFFFFFF
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@schlamar
schlamar / processify.py
Last active March 12, 2025 19:37
processify
import os
import sys
import traceback
from functools import wraps
from multiprocessing import Process, Queue
def processify(func):
'''Decorator to run a function as a process.
Be sure that every argument and the return value