Skip to content

Instantly share code, notes, and snippets.

View behumble's full-sized avatar

Alan Goo behumble

  • �self employed
  • Incheon, Korea
  • X @behumble
View GitHub Profile
@behumble
behumble / lint-issues
Created April 20, 2013 06:22
lint --show (Android lint)
Available issues:
Correctness
===========
AdapterViewChildren
-------------------
Summary: Checks that AdapterViews do not define their children in XML
Priority: 10 / 10
@behumble
behumble / adb_capture.sh
Created June 28, 2013 04:51
android screen capture in command line (linux, mac)
#!/bin/sh
adb shell screencap -p | sed 's/\r$//' > captured.png
#!/usr/bin/env groovy
@Grab(group='org.apache.poi', module='poi-examples', version='3.10-FINAL')
public class DummyToExposeAnnotationToCompiler {}
println "args : "+args
org.apache.poi.poifs.poibrowser.POIBrowser.main(args)
@behumble
behumble / ChessBoardDrawable.java
Last active July 7, 2016 11:49
Drawable implementation which draws a chess board to express transparency
package com.thinkfree.touchspan;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
@behumble
behumble / checkdroid-package-names.groovy
Last active August 29, 2015 14:01
duplicated AndroidManifest.xml@package finder
#!/usr/bin/env groovy
String extractPackageName(File manifestFile) {
return new XmlSlurper().parse(manifestFile).@package
}
void listDuplicates() {
for( e in packageToFiles ) {
files = e.value
if(files.size>1) {
@behumble
behumble / log-week.py
Created September 17, 2014 06:17
Displays SVN log by 'accent' from a week ago
#!/usr/bin/env python
import os
from datetime import date
from datetime import timedelta
from subprocess import call
a_week = timedelta(days=7)
a_week_ago = date.today() - a_week
@behumble
behumble / json2csv.py
Created March 26, 2015 07:31
flat key,value only (useful for i18n)
#!/usr/bin/env python
import sys
import json
import csv
reload(sys)
sys.setdefaultencoding('utf-8')
if len(sys.argv)<2:
print "json file name please"

Keybase proof

I hereby claim:

  • I am behumble on github.
  • I am behumble (https://keybase.io/behumble) on keybase.
  • I have a public key whose fingerprint is 382D 1D88 8BB7 458B 0BCC CDDF 0775 028B CE4B EAD5

To claim this, I am signing this object:

Download Udemy course videos using youtube-dl

$ youtube-dl --list-extractors | grep udemy

Steps

  1. Get link to the course to download. e.g. https://www.udemy.com/course-name/
  2. Login into udemy website, save the cookie from chrome using Chrome (Cookie.txt)[1] export extension. Save it to file udemy-cookies.txt
  3. Get the link of the video that you want to download. usually in format. Use the command provided below where you have to replace the {course_link} and {path_to_cookies_file} with respective paths.

# $ youtube-dl {course_link} --cookies {path_to_cookies_file}

@behumble
behumble / Support01.java
Last active July 16, 2018 04:20
an iText 5 Outline example to implement two columned target
package com.itextpdf;
import com.itextpdf.text.Document;
import com.itextpdf.text.Paragraph;
import com.itextpdf.text.pdf.PdfDestination;
import com.itextpdf.text.pdf.PdfOutline;
import com.itextpdf.text.pdf.PdfPTable;
import com.itextpdf.text.pdf.PdfWriter;
import java.io.FileOutputStream;