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 | |
| $key = 'SECRET_ACCESS_KEY_ID'; | |
| $accesskeyid='ACCESS_KEY_ID'; | |
| $expires = time()+60; // URL expires in 60 seconds | |
| $stringtosign = "GET\n\n\n{$expires}\n/BUCKET_NAME/PATH/TO/RESOURCE.EXT"; | |
| $signature = urlencode(base64_encode(hash_hmac('sha1',$stringtosign,$key,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
| import java.util.List; | |
| import javax.smartcardio.*; | |
| // VARIATION OF: | |
| // http://ludovicrousseau.blogspot.com/2010/06/pcsc-sample-in-java.html | |
| // The included commands are specific to acr122u reader / writer for Mifare Classic 1k tags | |
| public class pcsc { | |
| 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
| package main | |
| import "fmt" | |
| func closure(val string) func() { | |
| return func() { | |
| fmt.Println(val) | |
| } | |
| } |
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
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| ) | |
| type blah struct { | |
| Numbers []int | |
| Astring 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
| <?php | |
| $octave_command = "octave --no-window-system -q"; | |
| $spec = array( | |
| 0 => array("pipe", "r"), | |
| 1 => array("pipe", "w"), | |
| 2 => array("file", "/tmp/octave_stderr.txt", "a") | |
| ); |
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
| { | |
| "Host": "http://127.0.0.1:5984", | |
| "Patterns":{ | |
| "GET":[ | |
| "^/_all_db", | |
| "^/b$", | |
| "^/c" | |
| ], | |
| "POST":[ | |
| "^/db/" |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <link rel="stylesheet" href="normalize.css"> | |
| <style> | |
| .flex { | |
| height:200px; | |
| margin-right:5px; | |
| // DEFINES FLEX CONTEXT FOR IMMEDIATE CHILDREN |
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 | |
| abstract class GenericParser | |
| { | |
| abstract public static function getTokens(); | |
| public function convertTextToArray($data){ | |
| $tokens = static::getTokens(); |
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 | |
| $descriptorspec = array( | |
| 0 => fopen('php://stdin','r'), | |
| 1 => fopen('php://stdout','w'), | |
| 2 => array("file", "/tmp/error-output.txt", "a") | |
| ); | |
| $tempfile = tempnam('/tmp','testing_'); | |
| $cmd = getenv('EDITOR').' '.$tempfile; |
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 | |
| // utf8-encode a unicode code point | |
| function utf8encode($cp){ | |
| if($cp <= 0x7f){ | |
| return pack("c", $cp); | |
| } | |
| else if($cp <= 0x7ff){ | |
| return pack("cc", | |
| 0b11000000 | (($cp >> 6) & 31), | |
| 0b10000000 | ($cp & 63) |