This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| #!/usr/bin/env ruby | |
| # | |
| # Put this script in your PATH and download from onemanga.com like this: | |
| # onemanga_downloader.rb Bleach [chapter number] | |
| # | |
| # You will find the downloaded chapters under $HOME/Documents/OneManga/Bleach | |
| # | |
| # If you run this script without arguments, it will check your local manga downloads | |
| # and check if there are any new chapters | |
| # |
| By Klaus Wuestefeld | |
| 1) Torne-se excelente. | |
| Seja realmente bom em alguma coisa. Não fique só choramingando ou | |
| querendo progredir às custas dos outros. Não pense q pq vc sentou 4 | |
| anos numa faculdade ouvindo um professor falar sobre software q vc | |
| sabe alguma coisa. Jogador de futebol não aprende a jogar bola tendo | |
| aula. Ele pratica. Instrumentistas geniais nao aprendem a tocar tendo | |
| aula. Eles praticam. Pratique. Chegue em casa depois do trabalho e da |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| import re, urllib | |
| htmlSource = urllib.urlopen("https://class.coursera.org/ml/lecture/preview/1").read(200000) | |
| linksList = re.findall('data-lecture-view-link="(.*?)"', htmlSource) | |
| allVideos = [] | |
| for link in linksList: | |
| print 'Open', link | |
| htmlWithVideo = urllib.urlopen(link).read(200000) | |
| videosList = re.findall('<source.*type="video/mp4".*? src="(.*?)"',htmlWithVideo) |
| n,k = map(int, raw_input().split()) | |
| processed = sorted(range(1<<n), cmp=lambda a,b: cmp(bin(a).count("1"), bin(b).count("1")) if cmp(bin(a).count("1"), bin(b).count("1")) else cmp(a,b)) | |
| print bin(processed[k - 1])[2:].zfill(n) |
| n, k = gets.split.map(&:to_i) | |
| processed = (0...1<<n).to_a.sort_by { |x| [x.to_s(2).count("1"), x] } | |
| puts processed[k-1].to_s(2).rjust(n, '0') |
The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.
You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.
| Copyright 2011 Mike Tigas. All rights reserved. | |
| Redistribution and use in source and binary forms, with or without modification, are | |
| permitted provided that the following conditions are met: | |
| 1. Redistributions of source code must retain the above copyright notice, this list of | |
| conditions and the following disclaimer. | |
| 2. Redistributions in binary form must reproduce the above copyright notice, this list | |
| of conditions and the following disclaimer in the documentation and/or other materials |
| function dex-method-count() { | |
| cat $1 | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"' | |
| } | |
| function dex-method-count-by-package() { | |
| dir=$(mktemp -d -t dex) | |
| baksmali $1 -o $dir | |
| for pkg in `find $dir/* -type d`; do | |
| smali $pkg -o $pkg/classes.dex | |
| count=$(dex-method-count $pkg/classes.dex) |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"