Skip to content

Instantly share code, notes, and snippets.

@c00kiemon5ter
c00kiemon5ter / myloader.diff
Created May 21, 2010 19:53
myloader: change the owner/group dont set 777 permisions
file: README.mrdn
- 2) chmod 777 myloader and chmod 777 myloader/uploads to make both directories writeable by apache
+ 2.1) chown apache:apache myloader; chmod 755 myloader;
+ 2.2) chown apache:apache myloader/uploads; chmod 755 myloader/uploads;
--------------------------------------------------------------------------------
file: index.php
== 123c123
- echo "The file <b>".basename( $_FILES['uploadedfile']['name'])."</b> has been uploaded<br/>";
@c00kiemon5ter
c00kiemon5ter / weechat.conf
Created October 16, 2010 01:36 — forked from squarehimself/weechat.conf
weechat conf by squarehimself
#
# weechat.conf -- weechat v0.3.4-dev
#
[debug]
[startup]
command_after_plugins = ""
command_before_plugins = ""
display_logo = on
@c00kiemon5ter
c00kiemon5ter / gist:629790
Created October 16, 2010 13:36
grab some video IDs by date
curl -s http://www.canalplus.fr/rest/bootstrap.php?/bigplayer/search/zapping | sed "s/<DATE/\n<DATE/g" | sed -n '/<DATE>14/10/2010</DATE>/{s/.*<HAUT_DEBIT>\(.*\)<\/HAUT_DEBIT>.*<ID>\(.*\)<\/ID>.*/\2 \1/p}'
@c00kiemon5ter
c00kiemon5ter / dvd2mpg
Created February 27, 2011 10:05
dvd2mpg
#!/usr/bin/env bash
title_clr="$(tput setaf ..)" # or setab
done_clr="$(tput setaf ..)"
madeby_clr="$(tput setaf ..)"
reset_clr="$(tput sgr0)"
shopt -s nocaseglob
set -e
echo -e "${title_clr}DVD to MPG Script$reset_clr"
typedef struct f_decoder
{
int (*delete) (struct f_decoder *dec);
void *private;
} s_dec;
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
OBJ 'include 2 ViewPort objects:
vp : "Conduit" 'transfers data to/from PC
qs : "QuickSample" 'samples INA continuously in 1 cog- up to 20Msps
VAR
long stack[20]
long stack2[20]
long frame[400]
@c00kiemon5ter
c00kiemon5ter / post-commit
Created June 1, 2011 16:17
a hook to deploy static generated sites
#!/usr/bin/env bash
# executables prefix
_prefix="/usr/bin"
# git executable
_git="$_prefix/git"
# site generation executable
_generate="$_prefix/jekyll"
# options for the generator
@c00kiemon5ter
c00kiemon5ter / arr_rev
Created June 27, 2011 01:24
reverse an array
#!/bin/bash
reverse_array() {
local _array=$1
shift
unset $_array
while (( $# != 0 ))
do
printf -v $_array[$#-1] "%s" "$1"
shift
@c00kiemon5ter
c00kiemon5ter / java.make
Created June 27, 2011 01:46
compile java sources
mkdir -p build/classes/
echo "--> compiling sources.."
javac -sourcepath src/ -classpath build/classes/ \
-classpath lib/jpcap.jar \
-d build/classes/ \
src/foo/*.java \
src/foo/*.java \
src/bar/*.java \
@c00kiemon5ter
c00kiemon5ter / Tricky.java
Created June 27, 2011 01:47
funny how this works :D
class Tricky {
public static void main(String[] args) {
System.out.println("Hello World! This is my website");
http://c00kiemon5ter.github.com
System.exit(0);
}
}