Skip to content

Instantly share code, notes, and snippets.

Steven Lee witwall

Block or report user

Report or block witwall

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View cmdHere.reg
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\cmdhere]
@="Cmd Here"
[HKEY_CLASSES_ROOT\*\shell\cmdhere\command]
@="cmd.exe /c start cmd.exe /k color 02 & pushd \"%L\\..\""
[HKEY_CLASSES_ROOT\Folder\shell\cmdhere]
@="Cmd Here"
@witwall
witwall / nnet.R
Created Nov 24, 2017 — forked from primaryobjects/nnet.R
Neural network (nnet) with caret and R. Machine learning classification example, includes parallel processing.
View nnet.R
library(caret)
library(doParallel)
registerDoParallel(cores = 2)
# Read data.
data <- read.csv('train.csv')
test <- read.csv('test.csv')
# Set classification column to factor.
@witwall
witwall / gist:5334142
Created Apr 8, 2013
Here’s the code to replace images in PDFs, in Java and C#. It will replace the first image in the first page.
View gist:5334142
PdfReader pdf = new PdfReader("in.pdf");
PdfStamper stp = new PdfStamper(pdf, new FileOutputStream("c:\\out.pdf"));
PdfWriter writer = stp.getWriter();
Image img = Image.getInstance("image.png");
PdfDictionary pg = pdf.getPageN(1);
PdfDictionary res =
(PdfDictionary)PdfReader.getPdfObject(pg.get(PdfName.RESOURCES));
PdfDictionary xobj =
(PdfDictionary)PdfReader.getPdfObject(res.get(PdfName.XOBJECT));
if (xobj != null) {
@witwall
witwall / chntpw.md
Last active Apr 9, 2017
crack Windows password with chntpw
View chntpw.md

for details, please visit Reset Windows 7 Password with chntpw

chntpw -i SAM
chntpw version 1.00 140201, (c) Petter N Hagen
Hive <SAM> name (from header): <\SystemRoot\System32\Config\SAM>
ROOT KEY at offset: 0x001020 * Subkey indexing type is: 666c <lf>
View amap.city.py
# -*- coding: utf-8 -*-
#encoding=utf-8
import urllib2
import sys, json
from StringIO import StringIO
import gzip
import MySQLdb
import datetime
View shiny_knitr.text
### Sample knitr Doc
###Copy and paste all the code to http://shiny.alitrack.com/ace/03-knitr/
This is some markdown text. It may also have embedded R code
which will be executed.
```{r results="asis" ,echo=FALSE}
dat <- data.frame(
t = rep(0:23, each = 4),
var = rep(LETTERS[1:4], 4),
val = round(runif(4*24,0,50))
View count.vba
=(LEN(C3)-LEN(SUBSTITUTE(C3,B3,"")))/LEN(B3)
@witwall
witwall / php.ini
Created Feb 16, 2016
php.ini(PHP 5.6.15)
View php.ini
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
View hosts
#UPDATE:2013-07-07 21:01
127.0.0.1 localhost
#SmartHosts START
#Google Services START
203.208.46.200 0.docs.google.com
203.208.46.200 0.drive.google.com
203.208.46.200 1.docs.google.com
View svg.vba
' svg.vba released 11.08.2002
Private Function get_export_scaling_factor() As Single
'' point to pixel conversion factor
get_export_scaling_factor = (4 / 3)
End Function
You can’t perform that action at this time.