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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <time.h> | |
| #include <math.h> | |
| #include <iostream> | |
| #include "mpi.h" | |
| unsigned long micros = 0; | |
| float millis = 0.0; | |
| clock_t start, 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
| add_shortcode( 'call_function', 'custom_function_call' ); | |
| /** | |
| * @param $attributes | |
| * $attributes['name'] - function name to call | |
| * $attributes['args'] - arguments to be passed | |
| * @return string | |
| */ | |
| function custom_function_call( $attributes ) { | |
| $pattern = 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
| (function bindDeadSimpleMvc($) { | |
| var updateBindings = function () { | |
| console.log($(this).attr('placeholder')); | |
| $('[data-bind="' + $(this).attr('data-bind-variable') + '"]').html($(this).val()); | |
| }; | |
| $('input[data-bind-variable]').on('change keyup', updateBindings).each(updateBindings); | |
| })(jQuery); |
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
| rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
| rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm | |
| yum -y --enablerepo=remi,remi-test install redis |
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 delay(time) { | |
| return new Promise(function (fulfill) { | |
| setTimeout(fulfill, time); | |
| }); | |
| } |
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
| sudo apt-get update -y | |
| sudo apt-get install -y git | |
| sudo gem install sass | |
| curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - | |
| sudo apt-get install -y nodejs | |
| sudo npm i -g grunt-cli bower forever | |
| sudo npm i -g node-sass |
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
| sudo apt-get update -y | |
| sudo apt-get install -y git | |
| sudo gem install sass | |
| curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - | |
| sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 | |
| echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list | |
| sudo apt-get update | |
| sudo apt-get install -y mongodb-org | |
| sudo apt-get install -y build-essential tcl8.5 | |
| wget http://download.redis.io/releases/redis-stable.tar.gz |
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
| alias fuck="sudo" | |
| alias gitf="git fetch" | |
| alias gimme="brew install" | |
| alias vhosts="fuck nano /etc/apache2/extra/httpd-vhosts.conf" | |
| alias jspf="jspm i --unlink --force" | |
| alias rserv="brew services restart | |
| alias a2r="sudo apachectl -k restart" | |
| alias dm="docker-machine" | |
| denv(){ |
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
| .stars { | |
| position: relative; | |
| font-size: 20px; | |
| } | |
| .stars.big | |
| { | |
| font-size: 40px !important; | |
| } |
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 | |
| define('THRESHOLD', 80); | |
| $res = shell_exec('/bin/df -h | /bin/grep \'/dev/sda2\' | /usr/bin/awk \'{print $5}\''); | |
| $res = floatval(str_replace('%', '', trim($res))); | |
| if($res > THRESHOLD){ | |
| $ch = curl_init(); | |
| curl_setopt($ch, CURLOPT_URL, 'https://hooks.slack.com/services/T01234567/B11234567/123456712345671234567'); | |
| curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode([ |
OlderNewer