This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if($http_code >= 200 && $http_code < 300) { | |
if($body == "foo") { | |
// do something | |
} else if($body == "bar") { | |
// get drunk | |
} else { | |
// do something else | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
switch(true) { | |
case $http_code >= 200 && $http_code < 300: | |
// success! | |
break; | |
case $http_code >= 500 && $http_code < 600: | |
// server errpr | |
break; | |
case $http_code == 403: | |
// denied | |
break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
import org.w3c.dom.*; | |
import javax.xml.parsers.*; | |
import javax.xml.transform.*; | |
import javax.xml.transform.dom.*; | |
import javax.xml.transform.stream.*; | |
public class XMLWriter { | |
public static void main (String args[]) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>vc-build-version</key><string>1Y51</string> | |
<key>vc-build-revision</key><string>198959</string> | |
<key>id-validation-cert</key><string>http://static.ess.apple.com/identity/validation/cert-1.0.plist</string> | |
<key>id-initialize-validation</key><string>https://service2.ess.apple.com/WebObjects/TDIdentityService.woa/wa/initializeValidation</string> | |
<key>id-provision-phone-number</key><string>https://service2.ess.apple.com/WebObjects/TDIdentityService.woa/wa/provisionPhoneNumber</string> | |
<key>id-provision-ds-id</key><string>https://service.ess.apple.com/WebObjects/VCProfileService.woa/wa/idsProvisionEmails</string> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Version #1... | |
$="co)(1";($)[+[]]+($)[+!+[]]+([![]]+[][[]])[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[]) | |
[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[!+[]+!+[]+!+[]+!+[]+!+[]]+($)[+[]]+(!![]+[])[+[]]+($)[+!+[]]+(!![]+[]) | |
[+!+[]][($)[+[]]+($)[+!+[]]+([![]]+[][[]])[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[]) | |
[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[!+[]+!+[]+!+[]+!+[]+!+[]]+($)[+[]]+(!![]+[])[+[]]+($)[+!+[]]+(!![]+[]) | |
[+!+[]]][($)[+[]]+($)[+!+[]]+([![]]+[][[]])[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[]) | |
[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[!+[]+!+[]+!+[]+!+[]+!+[]]+($)[+[]]+(!![]+[])[+[]]+($)[+!+[]]+(!![]+[]) | |
[+!+[]]]((![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]+($) | |
[!+[]+!+[]+!+[]]+($)[!+[]+!+[]+!+[]+!+[]]+($)[!+[]+!+[]])(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Prints out each key/value pair: | |
awk '{ gsub(/[{}]/, "", $0); n=split($0,a,","); for (i=1; i<=n; i++) if(length(k) > 0) { if(index(a[i], k) != 0) { split(a[i],b,":"); print b[2]; } } else { print a[i] } }' | |
Example input: | |
{"verified":false,"protected":false,"location":"San Francisco"} | |
Example output: | |
"verified":false | |
"protected":false |

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
luna-send -n 1 palm://com.palm.firewall/portCtrl '{ "label": "pdlportT_8 | |
080", "protocol": "TCP", "port": 8080, "isDestinationPort": true, "isEnabled": true }' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:set compatible | |
let @y=':g/./|s/{/(/|s/}/)/|s/\[\S$/{/|s/^]/}/|s/(\S$/{/|s/)\S$/}/^M' | |
let @z=':2g/./|s/(/[/|s/)/]/^M' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.journal-comment-area-wrapper .comment .signature:before { | |
font-size: 10px; | |
content: ''; | |
display: block; | |
height: 0; | |
width: 0; | |
border-right: 2em solid #666; | |
border-bottom: 2em solid #000; | |
border-bottom: 2em solid transparent; | |
position: absolute; |