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 | |
| // Implementation | |
| function iterate($original) | |
| { | |
| $board = $original; | |
| for ($x = 0; $x < count($board); $x++) { | |
| $row = $board[$x]; | |
| for ($y = 0; $y < count($row); $y++) { | |
| $cell = $row[$y]; |
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 | |
| /** | |
| * Help from: | |
| * http://stackoverflow.com/questions/1821811/how-to-read-write-from-to-file | |
| * https://groups.google.com/forum/#!topic/golang-nuts/1mc64pj_S50 | |
| * http://pastebin.com/DgurHbpe | |
| **/ | |
| import ( |
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
| #!/usr/bin/php | |
| <?php | |
| // Requirements: | |
| // sudo apt-get install php5-cli php-pear libyaml-dev | |
| // sudo pecl install yaml | |
| $file = $_SERVER['HOME'] . '/.config/sflphone/sflphoned.yml'; | |
| $acct_id = get_account_id($file); | |
| $call_to = preg_replace('/[^0-9]/', '', $argv[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
| pcl2pdf() { | |
| input=$1 | |
| output=${2-$input.pdf} | |
| pcl6 -o $output -sDEVICE=pdfwrite $input | |
| } |
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
| function parseInputs(data) { | |
| var ret = {}; | |
| retloop: | |
| for (var input in data) { | |
| var val = data[input]; | |
| var parts = input.split('['); | |
| var last = ret; | |
| for (var i in parts) { |
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
| find . -type f -print0 | xargs -0 chmod 644 | |
| find . -type d -print0 | xargs -0 chmod 755 |
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
| { | |
| "bold_folder_labels": true, | |
| "caret_style": "phase", | |
| "ensure_newline_at_eof_on_save": true, | |
| "font_face": "Source Code Pro",//"Menlo", | |
| "font_size": 12, | |
| "highlight_line": true, | |
| "highlight_modified_tabs": true, | |
| "scroll_past_end": true, | |
| "theme": "Soda Dark.sublime-theme", |
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 | |
| /** | |
| * Copyright 2012-2013 Ryan. All rights reserved. | |
| * https://github.com/rsully | |
| * https://gist.github.com/rsully/4162064 | |
| * You may use this code provided this message and the above copyright are kept in place. | |
| **/ | |
| class DB extends PDO | |
| { | |
| protected $prepared = null; |
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
| # Get the amount of vectors we need to sum | |
| Input "SUM HOW MANY? ", A | |
| # Clear the previous lists | |
| ClrList lVSUA | |
| ClrList lVSUB | |
| ClrList lVSUX | |
| ClrList lVSUY | |
| # Zero-out each list with A items |
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
| if ARGV.count != 1 | |
| puts "Usage: [command ...] <file>" | |
| exit | |
| end | |
| f = File.new(ARGV[0], 'r') | |
| hash = Hash.new | |
| f.each_byte do |byte| |