View tounix.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Author: m039 <flam44 (at) gmail (dot) com> */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
static FILE *src; | |
static FILE *dst; | |
int main(int argc, char **argv) { | |
int c; |
View utf8.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Author: m039 <flam44 (at) gmail (dot) com> */ | |
#include <stdio.h> | |
/* Code point ranges */ | |
#define MINUSCULE 0x000d8 /* 0 to 7F */ | |
#define ALPHA 0x00251 /* 80 to 7FF */ | |
#define KATAKANA_NI 0x030A0 /* 800 to FFFF */ | |
#define CLEF 0x1D11E /* 10000 to 10FFFF */ |
View utf16_to_utf8.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Author: m039 <flam44 (at) gmail (dot) com> */ | |
#include <stdio.h> | |
/* | |
* Use the next command to test this snippet: | |
* | |
* iconv -f utf8 -t utf16 utf8.txt -o utf16.txt | |
* ./utf16_to_utf8 utf16.txt > utf8.txt | |
*/ |
View js-protection-methods.clj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Author: m039 <flam44 (at) gmail (dot) com> | |
;; | |
;; Some cracking methods to decrypt urls from javascript protected | |
;; site. All the methods for manual usage. | |
;; | |
;; The protection should be based on this | |
;; [http://simplythebest.net/scripts/DHTML_scripts/javascripts/javascript_60.html] | |
;; script. | |
;; alpha |
View get_sound.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Author: m039 <flam44 (at) gmail (dot) com> | |
wget --user-agent --referer='http://translate.google.com' "http://translate.google.com/translate_tts?ie=UTF-8&tl=ja&q=$1" -O ~/.anki/decks/MNN\ I.media/${1}.mp3 | |
View to_ogv.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Author: m039 <flam44 (at) gmail (dot) com> | |
# usage: ./to_ogv.sh <path to .flv file> <path to .ogv file> | |
ffmpeg -i ${1} -f ogg -vcodec libtheora -acodec libvorbis ${2} |
View fb.el
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; -*- mode: emacs-lisp; -*- | |
(require 'mm-uu) | |
(require 'json) | |
(require 'url) | |
(defvar facebook-access-token nil) | |
(defvar facebook-retrive-limit 1000) | |
(defun facebook-set-access-token (token) |
View sicp.scm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Exercise 1.16 | |
(define (fast-expt-iter acc i n b) | |
(cond ((= n 0) acc) | |
((= i 0) (fast-expt-iter b 1 (- n 1) b)) | |
((= i 1) (fast-expt-iter (* b b) 2 (- n 1) b)) | |
((>= (- n i) 0) (fast-expt-iter (* acc acc) (+ i i) (- n i) b)) | |
(else (* acc (fast-expt-iter acc 0 n b))))) | |
(define (fast-expt b n) |
View quote.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# quote api | |
# | |
alias getfortune='wget --timeout=3 -O - -q' | |
alias fortune='getfortune http://www.iheartquotes.com/api/v1/random' | |
alias myfortune='getfortune http://www.iheartquotes.com/api/v1/random?source=forrestgump' |
View iheartquotes.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## | |
## iheartquotes api | |
## | |
alias getfortune='wget --timeout=3 -O - -q' | |
alias fortune='getfortune http://www.iheartquotes.com/api/v1/random' | |
alias myfortune='getfortune http://www.iheartquotes.com/api/v1/random?source=humorix_misc' |
OlderNewer