Skip to content

Instantly share code, notes, and snippets.

@petermaloney
petermaloney / getssid
Created May 19, 2017
parse iwlist scan output for specific SSID
View getssid
getssid() {
local ssid="$1"
awk -v ssid="$ssid" '
BEGIN {
matching_lines="";
lines="";
found=0;
found_ssid=""
};
@petermaloney
petermaloney / punch.py
Last active May 19, 2017 — forked from jimparis/punch.py
Using FALLOC_FL_PUNCH_HOLE from Python to punch holes in files
View punch.py
#!/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')
View 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
View aaaaaaaaaa
hi there
=======
```
#!/bin/bash
echo hi
```
You can’t perform that action at this time.