Skip to content

Instantly share code, notes, and snippets.

@devSarry
devSarry / 0_reuse_code.js
Created June 26, 2016 18:25
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@devSarry
devSarry / gist:43e8a0321484fa5633b4781b79ffaf2c
Last active October 31, 2016 20:27 — forked from seanmcn/gist:62a021a765ad4f8e593b
The Perfect Web Server - Nginx, Ajenti, Ubuntu
#Insall Ajenti
apt-get update
wget http://repo.ajenti.org/debian/key -O- | apt-key add -
echo "deb http://repo.ajenti.org/ng/debian main main ubuntu" >> /etc/apt/sources.list
apt-get update
apt-get install ajenti
service ajenti restart
# Uninstall Apache2
sudo apt-get autoremove && sudo apt-get remove apache2*
@devSarry
devSarry / deploy.sh
Created January 27, 2017 13:45 — forked from jeroenherczeg/deploy.sh
Zero Deployment script for my Laravel project
#!/bin/sh
# Author : Jeroen Herczeg <jeroen@herczeg.be> HASSELT, LIMBURG, BELGIUM, EUROPE, EARTH
#
# Hello. My name is Jeroen Herczeg and I can help you or your team with my broad knowledge
# of frontend & backend web technologies and tools. I'm an eager learner and easily adapt to
# new environments. Work remotely? I like that. Need me on location? I'm sure we'll figure something out!
#
# http://herczeg.be
# Stop the script if there is an error
@devSarry
devSarry / post-receive
Created February 8, 2017 18:42 — forked from cedricziel/post-receive
Uberspace Laravel 5.2 Zero downtime deployments as a post-receive hook.
#!/bin/bash
source ~/.bash_profile
VERSION=$(date +%Y%m%d%H%M%S)
BASE_DIRECTORY=/var/www/virtual/foxyzor/html/application
SOURCE_ROOT=$BASE_DIRECTORY/versions/$VERSION
SHARED_FOLDER=$BASE_DIRECTORY/shared
STORAGE_FOLDER=$BASE_DIRECTORY/shared/storage
CURRENT_LINK=$BASE_DIRECTORY/current
@devSarry
devSarry / post-receive.sh
Created February 8, 2017 18:44 — forked from s4wny/post-receive.sh
Git hooks/post-receive
#!/bin/bash
WORKSPACE=/var/www/html/
echo "Post-receive"
git --work-tree=$WORKSPACE checkout -f
cd $WORKSPACE
@devSarry
devSarry / SetupServer.md
Created February 8, 2017 18:44 — forked from mkhlil1288/SetupServer.md
Setup server ( Ubuntu 16 - LEMP - GitHooks - ... )

Setup My Server

sudo apt-get update
sudo apt-get install git
sudo apt-get install nodejs
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo apt-get install npm
sudo npm install --global gulp

Communications

Introduction

For this project we will be doing all the communications over serial between the Arduino and the C# program.

We will be confroming to the "AT Commands" or Hayes

In short all serial commands sent to Arduino will be prefeced with

AT+

Test Plan for physical cable


Materials Needed

  • Tape measure
  • Bucket
  • Salt
  • Silicon Conformal Coating or glue gun
  • Strong magent
  • iron weight
[{"name":"hubs","color":"Red","position":{"x":100,"y":100},"increment":true,"timestamp":true,"softdelete":false,"column":[{"name":"name","type":"string","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":true,"guarded":false,"visible":false,"hidden":false,"colid":"c23","order":0},{"name":"human_readable_location","type":"string","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":true,"ui":false,"in":false,"un":false,"fillable":true,"guarded":false,"visible":false,"hidden":false,"colid":"c31","order":1},{"name":"lat","type":"string","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":true,"ui":false,"in":false,"un":false,"fillable":true,"guarded":false,"visible":false,"hidden":false,"colid":"c39","order":2},{"name":"long","type":"string","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":true,"ui":false,"in":false,"un":false,"fillable":true,"guarded":false,"visible":false,"hidden
[{"name":"hubs","color":"Red","position":{"x":100,"y":100},"increment":true,"timestamp":true,"softdelete":false,"column":[{"name":"name","type":"string","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":true,"guarded":false,"visible":false,"hidden":false,"colid":"c23","order":0},{"name":"human_readable_location","type":"string","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":true,"ui":false,"in":false,"un":false,"fillable":true,"guarded":false,"visible":false,"hidden":false,"colid":"c31","order":1},{"name":"lat","type":"string","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":true,"ui":false,"in":false,"un":false,"fillable":true,"guarded":false,"visible":false,"hidden":false,"colid":"c39","order":2},{"name":"long","type":"string","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":true,"ui":false,"in":false,"un":false,"fillable":true,"guarded":false,"visible":false,"hidden