Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| #!/bin/bash | |
| # | |
| # Converts LDIF data to CSV. | |
| # Doesn't handle comments very well. Use -LLL with ldapsearch to remove them. | |
| # | |
| # 2010-03-07 | |
| # dsimmons@squiz.co.uk | |
| # | |
| # Show usage if we don't have the right params |
| Vagrant::Config.run do |config| | |
| # ... | |
| config.vm.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] | |
| end |
| #!/bin/sh | |
| # modified by jfro from http://www.cnysupport.com/index.php/linode-dynamic-dns-ddns-update-script | |
| # Uses curl to be compatible with machines that don't have wget by default | |
| LINODE_API_KEY=licensekey | |
| DOMAIN_ID=domainid | |
| RESOURCE_ID=resourceid | |
| WAN_IP=`curl -s http://example.com/whatsmyip.php` | |
| if [ -f $HOME/.wan_ip.txt ]; then |
| import java.security.SecureRandom; | |
| import javax.crypto.spec.PBEKeySpec; | |
| import javax.crypto.SecretKeyFactory; | |
| import java.math.BigInteger; | |
| import java.security.NoSuchAlgorithmException; | |
| import java.security.spec.InvalidKeySpecException; | |
| /* | |
| * PBKDF2 salted password hashing. | |
| * Author: havoc AT defuse.ca |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| 79/02/28. 19.27.34. | |
| PROGRAM DND1 | |
| 00010 LET J4=1 | |
| 00030 PRINT | |
| 00100 BASE 0 | |
| 00110 LET X=0 | |
| 00120 LET J=0 | |
| 00130 LET K=0 | |
| 00140 X1=0 |
| # This is a Git cheat-sheet for beginners. | |
| # 1. Initial clone | |
| git clone <package name> | |
| # 2. Checkout a new branch | |
| git checkout -b <feature> | |
| # 3. Make changes | |
| echo "Hack hack hack" >> newfile.txt |
| package main | |
| import ( | |
| "time" | |
| ) | |
| type LazyInt chan func() int | |
| // Can't use pointer receiver: invalid operation: l <- (func literal) (send to non-chan type *LazyInt) | |
| func (l LazyInt) Future(i int) { |
| package main | |
| import ( | |
| "bufio" | |
| "bytes" | |
| "encoding/binary" | |
| "flag" | |
| "fmt" | |
| "net" | |
| "os" |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent