Skip to content

Instantly share code, notes, and snippets.

Avatar

Aung Khant yehgdotnet

View GitHub Profile
@limitedmage
limitedmage / cracker.js
Created Nov 28, 2010
MD5 Cracker in JavaScript (free under http://j.mp/ms-pl )
View cracker.js
// Global variables
var word, count, time, status; // search status
var running; // should status be updated?
var showPause, showResume, showStop; // to show or hide buttons
var worker; // main WebWorker
$(document).ready(function () {
// Update DOM every 500 ms
setInterval("updateDom()", 500);
@davidnunez
davidnunez / gist:1404789
Created Nov 29, 2011
list all installed packages in android adb shell
View gist:1404789
pm list packages -f
@ScottPhillips
ScottPhillips / .htaccess
Created Feb 2, 2012
Common .htaccess Redirects
View .htaccess
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@jtuberville
jtuberville / ElasticEmailClient.java
Created May 11, 2012
How to urlencode using HttpClient
View ElasticEmailClient.java
public static String sendViaHttpClient(String userName, String apiKey, String from, String fromName, String subject, String body, String to) {
NameValuePair[] data = {
new BasicNameValuePair("userName", userName),
new BasicNameValuePair("api_key", apiKey),
new BasicNameValuePair("from", from),
new BasicNameValuePair("from_name", fromName),
new BasicNameValuePair("subject", subject),
new BasicNameValuePair("body_html", body),
new BasicNameValuePair("to", to)
@UniIsland
UniIsland / SimpleHTTPServerWithUpload.py
Created Aug 14, 2012
Simple Python Http Server with Upload
View SimpleHTTPServerWithUpload.py
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
@joyrexus
joyrexus / README.md
Last active Sep 10, 2021 — forked from liamcurry/gist:2597326
Vanilla JS equivalents of jQuery methods
View README.md

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@JamieMason
JamieMason / unfollow.js
Last active Sep 10, 2021
Unfollow everyone on twitter.com
View unfollow.js
// Unfollow everyone on twitter.com, by Jamie Mason (https://twitter.com/fold_left)
// https://gist.github.com/JamieMason/7580315
//
// 1. Go to https://twitter.com/YOUR_USER_NAME/following
// 2. Open the Developer Console. (COMMAND+ALT+I on Mac)
// 3. Paste this into the Developer Console and run it
//
// See this tweet by @jacknotlittle for a video showing you how to do it;
// https://twitter.com/jacknotlittle/status/1387471283525459969
//
@tyndyll
tyndyll / bashpipe.go
Last active Aug 4, 2021
Execute Piped Shell Commands in Go
View bashpipe.go
package main
import (
"bytes"
"io"
"log"
"os"
"os/exec"
)
@di
di / tlds
Created Dec 4, 2014
Valid Two-Letter Top Level Domains
View tlds
ac
ad
ae
af
ag
ai
al
am
an
ao
@joswr1ght
joswr1ght / iosdebugdetect.cpp
Created Dec 29, 2014
Sample code to use ptrace() through dlsym on iOS to terminate when a debugger is attached. NOT FOOLPROOF, but it bypasses Rasticrac decryption.
View iosdebugdetect.cpp
// Build on OS X with:
// clang debugdetect.cpp -o debugdetect -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/ -miphoneos-version-min=7
#import <dlfcn.h>
#import <sys/types.h>
#import <stdio.h>
typedef int (*ptrace_ptr_t)(int _request, pid_t _pid, caddr_t _addr, int _data);
void disable_dbg() {
ptrace_ptr_t ptrace_ptr = (ptrace_ptr_t)dlsym(RTLD_SELF, "ptrace");
ptrace_ptr(31, 0, 0, 0); // PTRACE_DENY_ATTACH = 31
}