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
(define (toHex dec) | |
;local-function:solveHex | |
(define (solveHex dec res) | |
(let ((base 16)) | |
(cond | |
[(null? dec) res] | |
[(>= dec (- base 1)) (solveHex (quotient dec base) (string-append (getHex (remainder dec base)) res) )] | |
[else (string-append (getHex dec) res)] | |
) | |
) |
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
#attempt 2 | |
sudo iwlist wlan0 scan | |
sudo iwconfig wlan0 essid $WIFI key $KEY | |
sudo dhclient wlan0 |
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
# set the variables | |
SSH_HOST="gitlab.com" | |
SSH_USER=`whoami` | |
SSH_PORT=22 | |
# create folder with the correct permissions | |
mkdir -p ~/.ssh/; | |
chmod 700 ~/.ssh/; | |
touch ~/.ssh/authorized_keys |
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
SITE="laravel" | |
USER="dev" | |
cat >> $SITE-setup.sql << EOF | |
CREATE DATABASE ${SITE}; | |
GRANT ALL PRIVILEGES ON ${SITE}.* TO '${USER}'@'localhost' identified by ''; | |
FLUSH PRIVILEGES; | |
EOF | |
mysql -u root -p < $SITE-setup.sql |
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
# Create your superuser | |
$ mongo | |
> use admin | |
> db.createUser({user:"someadmin",pwd:"secret", roles:[{role:"root",db:"admin"}]}) | |
> exit | |
# Alias for convenience (optional and at your own risk) | |
$ echo 'alias mongo="mongo --port 27017 -u someadmin -p secret --authenticationDatabase admin"' >> ~/.bash_profile | |
$ source ~/.bash_profile |
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/env bash | |
# centos7-mamp-bootstrap.sh | |
# this is an end to end LAMP setup on Centos7. | |
# this was originally written for Bootsrap.sh on Vagrant | |
#DATABASE_PW: root password to you db | |
DATABASE_PW='' | |
#DOMAIN: name of domain, used for ServerName in Apache |
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/env bash | |
echo ">>> Installing Elasticsearch" | |
cd /opt | |
sudo wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" \ | |
"http://download.oracle.com/otn-pub/java/jdk/8u40-b25/jre-8u40-linux-x64.tar.gz" | |
sudo tar xvf jre-8*.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
--- | |
ip: "192.168.33.11" | |
memory: 2048 | |
cpus: 1 | |
hostname: laravel5-dev | |
name: laravel5-dev | |
provider: virtualbox | |
authorize: .homestead/[email protected] |
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
/* | |
|---------------------------------------------------------------- | |
| Have a Drink! | |
|---------------------------------------------------------------- | |
| | |
*/ | |
// --- INIT | |
var gulp = require('gulp'), | |
sass = require('gulp-ruby-sass'), // compiles sass to CSS |
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
angular | |
.module('storageModule', []) | |
.factory('store',['$window', function($window){ | |
return { | |
setLocal: function( key, value ){ | |
try{ | |
if( $window.Storage ){ | |
$window.localStorage.setItem(key, value); | |
return true; | |
} else { |
OlderNewer