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');
proto = "openchrome://" | |
arg1 = WScript.Arguments(0) | |
url = right(arg1, len(arg1)-len(proto)) | |
set objShell = CreateObject("WScript.Shell") | |
objShell.run("chrome "+url) |
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');
/** | |
* 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) | |
* |
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:
#!/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] |
<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> |
#!/usr/bin/python3 | |
# mysapsso.py - Decoding MYSAPSSO2 cookies | |
import sys | |
import fileinput | |
import urllib.parse | |
import base64 | |
import binascii | |
import re | |
import struct |
Install jsonlint
to act as syntastic json checker:
$ npm install jsonlint -g
Tell syntatastic about it:
" in your ~/.vimrc
#!/usr/bin/python2 | |
# setup: pip install requests beautifulsoup4 | |
from decimal import Decimal | |
import requests | |
from bs4 import BeautifulSoup | |
import sys | |
# Session setup |