Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| curl --include \ | |
| --no-buffer \ | |
| --header "Connection: Upgrade" \ | |
| --header "Upgrade: websocket" \ | |
| --header "Host: example.com:80" \ | |
| --header "Origin: http://example.com:80" \ | |
| --header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \ | |
| --header "Sec-WebSocket-Version: 13" \ | |
| http://example.com:80/ |
| node { | |
| echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1' | |
| echo 'No quotes, pipeline command in single quotes' | |
| sh 'echo $BUILD_NUMBER' // 1 | |
| echo 'Double quotes are silently dropped' | |
| sh 'echo "$BUILD_NUMBER"' // 1 | |
| echo 'Even escaped with a single backslash they are dropped' | |
| sh 'echo \"$BUILD_NUMBER\"' // 1 | |
| echo 'Using two backslashes, the quotes are preserved' | |
| sh 'echo \\"$BUILD_NUMBER\\"' // "1" |
| #To Decrypt Jenkins Password from credentials.xml | |
| #<username>jenkins</username> | |
| #<passphrase>your-sercret-hash-S0SKVKUuFfUfrY3UhhUC3J</passphrase> | |
| #go to the jenkins url | |
| http://jenkins-host/script | |
| #In the console paste the script | |
| hashed_pw='your-sercret-hash-S0SKVKUuFfUfrY3UhhUC3J' |
| add_action('get_header', 'remove_admin_login_header'); | |
| function remove_admin_login_header() { | |
| remove_action('wp_head', '_admin_bar_bump_cb'); | |
| } |
| # INCORRECT! DON'T DO THIS! | |
| >>> x = "www.alliancefrançaise.nu" # This is the problematic line. Forgot to make this a Unicode string. | |
| >>> print x | |
| www.alliancefrançaise.nu | |
| >>> x.encode('punycode') | |
| 'www.Alliancefranaise.nu-h1a31e' | |
| >>> x.encode('punycode').decode('punycode') | |
| u'www.Alliancefran\xc3\xa7aise.nu' | |
| >>> print x.encode('punycode').decode('punycode') | |
| www.alliancefrançaise.nu |
| function heidiDecode(hex) { | |
| var str = ''; | |
| var shift = parseInt(hex.substr(-1)); | |
| hex = hex.substr(0, hex.length - 1); | |
| for (var i = 0; i < hex.length; i += 2) | |
| str += String.fromCharCode(parseInt(hex.substr(i, 2), 16) - shift); | |
| return str; | |
| } | |
| document.write(heidiDecode('755A5A585C3D8141786B3C385E3A393')); |
| Report Run on Aug 17th, 2012 | |
| ---------------------------- | |
| Aug, 2011: 242 tickets, 67 awaiting review (28%) | |
| Sep, 2011: 261 tickets, 74 awaiting review (28%) | |
| Oct, 2011: 260 tickets, 53 awaiting review (20%) | |
| Nov, 2011: 299 tickets, 60 awaiting review (20%) | |
| Dec, 2011: 296 tickets, 74 awaiting review (25%) | |
| Jan, 2012: 230 tickets, 72 awaiting review (31%) | |
| Feb, 2012: 196 tickets, 58 awaiting review (30%) |
| <?php | |
| /* | |
| Plugin Name: R Debug | |
| Description: Set of dump helpers for debug. | |
| Author: Andrey "Rarst" Savchenko | |
| Author URI: https://www.rarst.net/ | |
| License: MIT | |
| */ |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.