Skip to content

Instantly share code, notes, and snippets.

View trockenasche's full-sized avatar

Murdoc Bates trockenasche

View GitHub Profile
@revolunet
revolunet / chrome.vbs
Created February 22, 2012 11:35
open chrome window from internet explorer
proto = "openchrome://"
arg1 = WScript.Arguments(0)
url = right(arg1, len(arg1)-len(proto))
set objShell = CreateObject("WScript.Shell")
objShell.run("chrome "+url)
@JeffreyWay
JeffreyWay / set-value.md
Created July 28, 2012 19:09
PHP: Set value if not exist

You know how, in JavaScript, we can set a value to a variable if one doesn't, like this:

name = name || 'joe';

This is quite common and very helpful. Another option is to do:

name || (name = 'joe');
@christianjianelli
christianjianelli / shBrushAbap.js
Last active April 25, 2020 10:13
SyntaxHighlighter brush for ABAP code
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (July 02 2010)
*
@guifromrio
guifromrio / nodejs-ubuntu-bind-port-80.md
Last active June 25, 2024 10:30
Allow Node.js to bind to privileged ports without root access on Ubuntu

How to: Allow Node to bind to port 80 without sudo

TL;DR

Only do this if you understand the consequences: all node programs will be able to bind on ports < 1024

sudo setcap 'cap_net_bind_service=+ep' /usr/local/bin/node

Important: your node location may vary. Use which node to find it, or use it directly in the command:

@eshizhan
eshizhan / conv2vmx-ovf.py
Last active April 25, 2021 22:05
a script that can help import VMs into VMware ESXi from VirtualBox. tested vbox 4.2.18 and ESXi 5.1.
#!/usr/bin/env python
#
# usage:
# conv2vmx-ovf.py some-vm.ovf
#
# ref: http://www.cnblogs.com/eshizhan/p/3332020.html
#
import sys
fn = sys.argv[1]
@matbor
matbor / gauge-mqtt-websockets.html
Created September 25, 2013 12:31
Steelseries gauge displaying temperature live using websockets from a mqtt/mosquitto broker.
<head>
<title>Testing Temp Gauge</title>
</head>
<body onload="init();">
<canvas id=gaugeCanvas width=200 height=200>No canvas in your browser...sorry...</canvas>
</body>
<script type="text/javascript" src="mosquitto-1.1.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type=text/javascript src=http://dl.dropbox.com/u/128855213/SteelSeries/tween-min.js></script>
<script type=text/javascript src=http://dl.dropbox.com/u/128855213/SteelSeries/steelseries-min.js></script>
@namuol
namuol / INSTALL.md
Last active July 24, 2023 11:53
rage-quit support for bash

rage-quit support for bash

HOW TO INSTALL

Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.

@thomaspatzke
thomaspatzke / mysapsso-decoder.py
Last active June 7, 2023 14:54
Decoder/Encoder for MYSAPSSO2 Cookies/SAP SSO tokens
#!/usr/bin/python3
# mysapsso.py - Decoding MYSAPSSO2 cookies
import sys
import fileinput
import urllib.parse
import base64
import binascii
import re
import struct
@christoomey
christoomey / json-vim-config.md
Last active January 4, 2018 18:24
Configuration for better JSON editing in Vim

Install jsonlint to act as syntastic json checker:

$ npm install jsonlint -g

Tell syntatastic about it:

" in your ~/.vimrc
@zakx
zakx / damazon.py
Last active August 30, 2020 00:01 — forked from trehn/damazon.py
#!/usr/bin/python2
# setup: pip install requests beautifulsoup4
from decimal import Decimal
import requests
from bs4 import BeautifulSoup
import sys
# Session setup