Skip to content

Instantly share code, notes, and snippets.

void
bubblesort(int A[], unsigned int n)
{
int i, j;
for(i = 0; i < n; i++) {
for(j = i; j < n; j++) {
if(A[i] > A[j]) {
int t = A[j];
A[j] = A[i];
@dualbus
dualbus / gist
Created May 17, 2014 01:08
gist
"@diana_clarke: I'll never know why I miscarried, but I do know it happened the weekend the internet decided to toss abuse my way. @shanley is a bully. #!ok"
[...]
"@sindarina: @diana_clarke I know this is traumatic, but ... to insinuate it being linked to @shanley, that feels like crossing a line to me. Not OK "
"@juliepagano: @diana_clarke I am really sorry for your loss. I cannot imagine how hard that is. However, the implication you’re making here is troubling."
Como dijo el Comediante: "It's a joke. It's all a fuckin' joke."
#include <stdlib.h>
char *shell_escape(char *, size_t);
int main(int argc, char **argv) {
puts(shell_escape("'; echo shell'", 14));
}
char *shell_escape(char *data, size_t n) {
size_t i, j, single_quotes = 0;
1/15 5*3 30 15+8=23
1/23 23 46 23+16=39
1/39 13*3 78 39+24=63
1/63 7*3*3 126 63+32=95
#!/bin/bash
# read a line
while IFS= read -r line; do
# remove everything *after* (%%) the first space in the string
# that's the date.
date=${line%% *}
# remove everything *before* (##) 'SRC=' from line, and put that in
#!/bin/sh
log_file=$1
reopen() {
exec > "$log_file" 2>&1
}
trap reopen HUP
reopen
while IFS= read -r line; do
printf '%s\n' "$line";
alienino 3511c0997339cfcccccca39f214322eb22e8fc43
all'equipaggio 14555555ec8dcf1400db9b375c5b8ca836362d8b
Anacyclus 182c40fc4df5b4d997feeeeee22c4dbf059a95d4
bajar 1352a687f6840df8801aaaaaadf71de84b816f86
bandwagon's f6e6deb71111110839bc14dd9cbab6eb7b16f09c
barbihecho bc45de24f03f2a086666668e2a0812a5f270c8cb
calcitrant 86d4ffffff9aae00ace440e93c1d87bb4ec8b56c
cornetti 000000f636f0d7cbc963a62f3a1bc87c9c985a04
crépir a21303cfa9b7c6f0cccccc19cc59556a188ccac7
cyclosporin's b5baaaaaa744f480586a905f692cdec2fa0a1919
#!/bin/sed -f
# unary to binary converter tool
#
# Converts an input resembling a number in a unary base (for example,
# 5 represented as ..... i.e. 5 dots), to the representation of the
# number in a binary base (using 1 and 0 as the symbols for the
# base).
#
#
sed '/./!be;s/"/""/g;/[, \t"]/s/.*/"&"/;H;$!d;:e;x;s/\n//;s/\n/,/g'
#!/bin/sh
channel_group=$HOME/.services
channel=$channel_group/xinit
parent=$$
unset pids
trap 'kill $pids; rm -f "$channel"' INT TERM
VBoxClient -d --clipboard & pids="$pids $!"