Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am wookiecooking on github.
  • I am wookiecooking (https://keybase.io/wookiecooking) on keybase.
  • I have a public key ASBAhHU9JmF0nnwFRk9wH91mGV_F-z909G4s7ykMQuEHTAo

To claim this, I am signing this object:

$(".drydepot-product-fitter").steps({
headerTag: "h3",
bodyTag: "section",
transitionEffect: "slideLeft",
autoFocus: true,
onStepChanging: function (event, currentIndex, newIndex)
{
if (currentIndex > newIndex) {
return true;
}
@wookiecooking
wookiecooking / default
Created March 18, 2016 03:50
static nginx
server {
listen 80;
server_name ~^(www\.)?(?<sname>.+?)$;
root /var/www/html/$sname;
index index.html;
charset utf-8;
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
access_log /var/log/nginx/$sname-access.log;
error_log /var/log/nginx/$sname-error.log debug;
@wookiecooking
wookiecooking / app.js
Created March 7, 2016 05:15
express laziness
var app = require('express')();
var bodyParser = require('body-parser');
var _ = require('lodash')
var mongoose = require('mongoose');
var Schema = mongoose.Schema
mongoose.connect('mongodb://127.0.0.1:27017/test');
var CatSchema = new Schema({
name: String,
@wookiecooking
wookiecooking / index.php
Created November 1, 2015 21:04
upload-git-diff-with-ftp
<?
set_time_limit(0);
#################################
#################################
#################################
# FTP Upload changes from git-diff
# by Marco
# 2012

Keybase proof

I hereby claim:

  • I am wookiecooking on github.
  • I am wookiecooking (https://keybase.io/wookiecooking) on keybase.
  • I have a public key whose fingerprint is 56DA D4CA CD76 C145 44BF F9C6 F4B9 671E DBB9 7CC5

To claim this, I am signing this object:

@wookiecooking
wookiecooking / git-lg.sh
Created September 8, 2015 14:58
better git log
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
var _ = require('lodash');
var test = { a:'This will be a string' };
var result = {a: String };
_.map(test, function(v, k) {
result[k] = v;
});
router.post('/login', function(req, res) {
var client = xmlrpc.createClient({ host: 'https://wordpress.url/xmlrpc.php', port: 80, path: '/'})
client.methodCall('external.login', [req.body.username, req.body.password], function (error, value) {
if(value) {
req.session.user_id = value;
res.send('success');
} else {
res.send('Error connecting to server');
}
})
# Monitoring raw hard drives in virtualbox
VBoxManage internalcommands createrawvmdk -filename ~/win7.vmdk -rawdisk /dev/sda -register