Skip to content

Instantly share code, notes, and snippets.

View LouDnl's full-sized avatar
👑
USBSID-Pico ~ buy @ SmallRun or PCBWay

LouD LouDnl

👑
USBSID-Pico ~ buy @ SmallRun or PCBWay
View GitHub Profile
@john2x
john2x / 00_destructuring.md
Last active August 1, 2026 18:02
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences

@ipedrazas
ipedrazas / gist:2c93f6e74737d1f8a791
Created September 18, 2014 22:13
List Docker Container Names and IPs
function drips(){
docker ps -q | xargs -n 1 docker inspect --format '{{ .NetworkSettings.IPAddress }} {{ .Name }}' | sed 's/ \// /'
}
@mcandre
mcandre / cmdline.txt
Created December 22, 2014 03:07
Raspberry Pi /boot/cmdline.txt
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 cgroup_enable=memory elevator=deadline rootwait
@maio
maio / deaccent.clj
Created December 26, 2014 13:06
Remove accent from string using Clojure
(defn deaccent [str]
"Remove accent from string"
;; http://www.matt-reid.co.uk/blog_post.php?id=69
(let [normalized (java.text.Normalizer/normalize str java.text.Normalizer$Form/NFD)]
(clojure.string/replace normalized #"\p{InCombiningDiacriticalMarks}+" "")))
@raulmoyareyes
raulmoyareyes / networkCommand.md
Last active October 7, 2025 15:51
Linux command to check Internet connection speed.

# View public IP

  • curl -s checkip.dyndns.org | sed 's#.Address: (.)</b.*#\1#'
  • wget -qO - icanhazip.com
  • curl ifconfig.me
  • curl ident.me
  • dig +short myip.opendns.com @resolver1.opendns.com
  • lynx -dump ifconfig.me | grep 'IP Address'
  • curl ipecho.net/plain
  • curl bot.whatismyipaddress.com
  • curl ipinfo.io
@J2TEAM
J2TEAM / sublime-text-scopes.md
Last active June 25, 2025 08:34 — forked from iambibhas/scopes.txt
Sublime Text 2/3: Snippet scopes

Here is a list of scopes to use in Sublime Text 2/3 snippets -

ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
@epcim
epcim / wifi-hacking.howto.sh
Last active July 27, 2026 01:52
wifi-hacking.howto.sh
##-- repeatedly find hosts --
IP_RANGE=172.25.25.0-254
HOST_LIST=HostList
HOST_LIST_NEW=.tmp_hln
TMP_NEWIP=.tmp_newip
touch $HOST_LIST
nmap -sL -e eth0 -PI -PT -T2 -PS $IP_RANGE | grep -B1 MAC | grep -v "\-\-" | sed -e 's/not scanned//' > $HOST_LIST_NEW
for i in `grep Host $HOST_LIST_NEW| awk '{print $2}'`; do [ `grep $i $HOST_LIST | wc -l` -eq 0 ] && echo $i; done > $TMP_NEWIP
for i in `cat $TMP_NEWIP`; do grep -A1 $i $HOST_LIST_NEW; done >> $HOST_LIST
@ilg-ul
ilg-ul / license-gpl-c-header.txt
Last active August 14, 2024 00:07
C header with GPL license text.
/*
* This file is part of the XXX distribution (https://github.com/xxxx or http://xxx.github.io).
* Copyright (c) 2015 Liviu Ionescu.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
@worace
worace / hotload.markdown
Created December 4, 2015 21:31
Hotloading Dependencies in Leiningen with refactor-nrepl

Hotloading Deps in Lein

Refactor nrepl makes it possible to hotload a dependency into lein without rebooting the repl. This is awesome but it's not super well documented.

First, make sure you have the plugin installed by adding it to the :plugins key of your lein profile. This can be done per project in project.clj, but is probably best to include in your ~/.lein/profiles.clj

Here's an example:

@mamonu
mamonu / qcow2vdi.sh
Last active April 27, 2025 12:25
convert a qcow2 vm to a VirtualBox vm format
qemu-img convert -O vdi gnome.qcow2 gnome.vdi
#if its a raw image then:
VBoxManage convertdd opnstk.raw VBox.vdi --format VDI