Skip to content

Instantly share code, notes, and snippets.

View lipi's full-sized avatar

Andras Lipoth lipi

  • Auckland, New Zealand
View GitHub Profile
@htr3n
htr3n / macos-ramdisk.md
Last active May 1, 2024 10:16
Creating RAM disk in macOS

Built-in

diskutil erasevolume HFS+ 'RAM Disk' `hdiutil attach -nobrowse -nomount ram://XXXXX`

where XXXXX is the size of the RAM disk in terms of memory blocks.

Notes:

@hlecuanda
hlecuanda / Git-Squash-Implementation.md
Last active April 7, 2024 02:46
Git Squash alias, from amazingly clean explanation on stackoverflow

From This other answer on the same thread

Based on Chris Johnsen's answer:

I added this line to the [alias] section of my git config file (~/.gitconfig):

squash = "!f(){ git reset --soft HEAD~${1} && git commit --edit -m\"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; };f"
@jwreagor
jwreagor / EmacsKeyBinding.dict
Created March 20, 2014 18:41
Global Emacs Key Bindings for OS X
{
/* Keybindings for emacs emulation. Compiled by Jacob Rus.
*
* This is a pretty good set, especially considering that many emacs bindings
* such as C-o, C-a, C-e, C-k, C-y, C-v, C-f, C-b, C-p, C-n, C-t, and
* perhaps a few more, are already built into the system.
*
* BEWARE:
* This file uses the Option key as a meta key. This has the side-effect
* of overriding Mac OS keybindings for the option key, which generally
@wolfg1969
wolfg1969 / README.md
Last active December 15, 2023 08:06
python-gps sample codes, Raspberry Pi 4 + u-blox GPS module (uart)

Raspberry Pi 4 + u-blox GPS module (uart)

$ sudo apt-get update
$ sudo apt-get install gpsd gpsd-client python-gps

Enable the serial interface and disable serial login shell with raspi-config then reboot. Confirm /dev/ttyS0 exists

$ ls -l /dev/serial*
lrwxrwxrwx 1 root root 5 May 9 10:38 /dev/serial0 -> ttyS0
@zziuni
zziuni / stuns
Created September 18, 2012 08:05
STUN server list
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net
@jfro
jfro / update-dns.sh
Created January 11, 2012 17:31
Linode dynamic DNS updating script
#!/bin/sh
# modified by jfro from http://www.cnysupport.com/index.php/linode-dynamic-dns-ddns-update-script
# Uses curl to be compatible with machines that don't have wget by default
LINODE_API_KEY=licensekey
DOMAIN_ID=domainid
RESOURCE_ID=resourceid
WAN_IP=`curl -s http://example.com/whatsmyip.php`
if [ -f $HOME/.wan_ip.txt ]; then
@koenbollen
koenbollen / punch.py
Created July 5, 2010 19:10
Proof of Concept: UDP Hole Punching
#!/usr/bin/env python
#
# Proof of Concept: UDP Hole Punching
# Two client connect to a server and get redirected to each other.
#
# This is the client.
#
# Koen Bollen <meneer koenbollen nl>
# 2010 GPL
#