Skip to content

Instantly share code, notes, and snippets.

hi there
=======
```
#!/bin/bash
echo hi
```
@petermaloney
petermaloney / punch.py
Last active September 15, 2015 09:51 — forked from vontrapp/punch.py
#!/usr/bin/python
import ctypes
import ctypes.util
import os
import re
null_re = re.compile('^\0*$')
c_off_t = ctypes.c_int64
@petermaloney
petermaloney / punch.py
Last active May 19, 2017 08:23 — forked from jimparis/punch.py
Using FALLOC_FL_PUNCH_HOLE from Python to punch holes in files
#!/usr/bin/python
import ctypes
import ctypes.util
import os
c_off_t = ctypes.c_int64
def make_fallocate():
libc_name = ctypes.util.find_library('c')
@petermaloney
petermaloney / getssid
Created May 19, 2017 13:07
parse iwlist scan output for specific SSID
getssid() {
local ssid="$1"
awk -v ssid="$ssid" '
BEGIN {
matching_lines="";
lines="";
found=0;
found_ssid=""
};