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
def shuffle_string(string) | |
string.split('').shuffle.join | |
end |
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 | |
$min = min( array_map("min", $multable) ); | |
$max = max( array_map("max", $multable) ); |
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 | |
/** | |
* Validate Age to be greater or equal to 18 | |
* | |
* @param $birthdate | |
* @return boolean | |
*/ | |
function validateAge($birthdate) | |
{ | |
$currentDate = new DateTime("now"); |
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 | |
/** | |
* A class for performing minor calculations on large integer lists. | |
*/ | |
class Main | |
{ | |
private $buffSize; | |
private $list; | |
/** |
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 | |
/** | |
* Gets the HTTP status code for the given URL. | |
* | |
* @param string $url The URL to check. | |
* @return int | |
*/ | |
function url_http_status($url) { | |
$ch = curl_init($url); |
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", | |
"color_scheme": "Packages/User/base16-eighties.dark (SL).tmTheme", | |
"default_line_ending": "unix", | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": true, | |
"fallback_encoding": "UTF-8", | |
"folder_exclude_patterns": | |
[ |
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
{ | |
"installed_packages": | |
[ | |
"AdvancedNewFile", | |
"Alignment", | |
"All Autocomplete", | |
"AutoFileName", | |
"Autoprefixer", | |
"Blade Snippets", | |
"BracketHighlighter", |
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
# Common | |
alias ..="cd .." | |
alias ...="cd ../.." | |
alias h='cd ~' | |
alias c='clear' | |
alias ll='ls -lahG' | |
# Test | |
alias codecept='vendor/bin/codecept' | |
alias crf='codecept run functional' |
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
### Install guide | |
sudo apt-get update | |
sudo apt-get install wkhtmltopdf | |
sudo apt-get install xvfb | |
echo 'xvfb-run --server-args="-screen 0, 1024x768x24" /usr/bin/wkhtmltopdf $*' > /usr/bin/wkhtmltopdf.sh | |
chmod a+x /usr/bin/wkhtmltopdf.sh | |
ln -s /usr/bin/wkhtmltopdf.sh /usr/local/bin/wkhtmltopdf | |
wkhtmltopdf http://www.google.com output.pdf | |
######################################################## |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "base" | |
config.vm.box_url = "http://files.vagrantup.com/precise32.box" |