Skip to content

Instantly share code, notes, and snippets.

View marten-seemann's full-sized avatar

Marten Seemann marten-seemann

View GitHub Profile
@grizmio
grizmio / gist:90996af3ee7e31937e2a291218a7c094
Created September 9, 2021 14:39
Installing dropwatch on ubuntu 20.04
For the next error, install libtool
cc -g -Wall -Werror -I/usr/include/libnl3 -I/usr/include/libnl3 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -I/usr/include/readline -g -O2 -lnl-3 -lnl-genl-3 -lnl-3 -lreadline -lpcap -lbfd -o dropwatch main.o lookup.o lookup_kas.o lookup_bfd.o
/usr/bin/ld: main.o: in function `free_netlink_msg':
/home/aneweraofwonder/srcs/dropwatch/src/main.c:254: undefined reference to `nlmsg_free'
/usr/bin/ld: main.o: in function `handle_dm_config_new_msg':
/home/aneweraofwonder/srcs/dropwatch/src/main.c:561: undefined reference to `genlmsg_parse'
/usr/bin/ld: /home/aneweraofwonder/srcs/dropwatch/src/main.c:570: undefined reference to `nla_get_u8'
@nicolasembleton
nicolasembleton / restart_bluetooth.sh
Last active May 11, 2024 17:43
Restart Bluetooth Daemon on Mac OS X without restarting
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active June 16, 2024 13:44
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@thorn
thorn / get_url_params.js.coffee
Created May 23, 2012 13:14
getting url params with coffeescript and jquery
# Returns get parameters.
#
# If the desired param does not exist, null will be returned
#
# To get the document params:
# @example value = $(document).getUrlParam("paramName");
#
# To get the params of a html-attribut (uses src attribute)
# @example value = $('#imgLink').getUrlParam("paramName");
jQuery.fn.extend
@marten-seemann
marten-seemann / Mac Keyboard Symbols.textexpander
Created May 23, 2012 10:08
Symbols from the Mac Keyboard using Unicode Chars
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>groupInfo</key>
<dict>
<key>expandAfterMode</key>
<integer>0</integer>
<key>groupName</key>
<string>Mac Keyboard Symbols</string>

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables