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
/** WTFContentProvider.java --- | |
* | |
* Copyright (C) 2013 Mozgin Dmitry | |
* | |
* Author: Mozgin Dmitry <flam44@gmail.com> | |
* | |
* | |
*/ | |
package com.m039.example.provider; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<shape | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:shape="rectangle" | |
> | |
(truncate (* 255 0.2))51 (#o63, #x33, ?3) | |
<gradient | |
android:startColor="#4C000000" |
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' |
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' |
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) |
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) |
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} |
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 | |
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 |
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 | |
*/ |