Skip to content

Instantly share code, notes, and snippets.

View birkof's full-sized avatar
🤟

Daniel Stancu birkof

🤟
View GitHub Profile
@birkof
birkof / a new mac setup.md
Last active August 29, 2015 14:27 — forked from maxfenton/a-new-mac-setup.md
System setup stuff for a new mac

New computer setup

  • a/o 2015-07-24 *

Format the drive

  1. Restart with cmd-R or cmd-D
  2. Erase drive / 3x if second-handk
  3. Reinstall MacOS
@birkof
birkof / test_wifi.ino
Last active August 29, 2015 14:19 — forked from volca/test_wifi.ino
#include <SoftwareSerial.h>
// Important!! We use pin 13 for enable esp8266
#define WIFI_ENABLE_PIN 13
#define DEBUG 1
#define SSID "YOUR-WIFI-SSID"
#define PASS "YOUR-WIFI-SECRET"
#include <PubSubClient.h>
#include <ESP8266WiFi.h>
const char* ssid = ".................";
const char* password = "................";
char* topic = "esp8266_arduino_out";
char* server = "iot.eclipse.org";
// Addition to jQuery to get the inner text width
$.fn.textWidth = function(){
var text = $(this).html();
$(this).html('<span>'+text+'</span>');
var width = $(this).find('span:first').width();
$(this).html(text);
return width;
};
{
"name": "socket.io.1.0",
"version": "1.0.0",
"description": "Socket.IO 1.0 using Primus",
"main": "socket.io.1.0.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
# install git
yum install git -y
# get nvm
git clone git://github.com/creationix/nvm.git ~/nvm
# activate nvm
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://npmjs.org/install.sh | sh
# install git
yum install git -y
# get nvm
git clone git://github.com/creationix/nvm.git ~/nvm
# activate nvm
/* This method gets called if you use the parameter loopServerCommands */
/* This example sends '/join #test' to the server whenever it receives a part in #test
Make sure params.loopServerCommands is set to true.
Known bugs:
1) It also runs when other people part the channel (Cannot fix with current version of LightIRC)
*/
var channel = new Array();
var timeout;