This file contains 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
var socket_lib = require("./websocket"); | |
var socket_connector = new socket_lib(); | |
const qs = require("qs"); | |
/* | |
Current socket server socket.io library is 0.9.16 | |
*/ | |
/* | |
Connection parameters |
This file contains 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
_ = require('underscore'); | |
var fakeServerCall = function (obj) { | |
if (obj && obj.id) { | |
return { | |
state: true | |
}; |
This file contains 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
var RSVP = require('rsvp'); | |
var fakePromise = function (obj) { | |
var promise = new RSVP.Promise(function (resolve, reject) { | |
// succeed | |
resolve({ | |
state: true | |
}); |
This file contains 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
# $1 = module project name, eg. matise.mapbox | |
# $2 = app name, eg. maptests | |
# Place this script in your module folder | |
#Example usage sh build_droid.sh matise.mapbox maptests | |
cd android;ant;unzip dist/$1*.zip -d tmp;rm -rf "/Users/Sean/Documents/Appcelerator_Studio_Workspace/$2/modules/android/$1" ;cp -R tmp/modules/android/$1 /Users/Sean/Documents/Appcelerator_Studio_Workspace/$2/modules/android;rm -rf tmp; |
This file contains 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
// OS | |
if(Ti.Platform.osname === 'iPhone' || Ti.Platform.osname === 'iPad') { | |
var ios = true; | |
} | |
/** | |
* Save file function | |
* | |
* @file: Binary file (Blob) | |
* @filename: Name of file (String) |
This file contains 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 wget -O /usr/bin/zram.sh https://raw.githubusercontent.com/novaspirit/rpi_zram/master/zram.sh | |
sudo chmod +x /usr/bin/zram.sh | |
sudo chmod +x /usr/bin/zram.sh | |
sudo nano /lib/systemd/system/zram.service | |
---- copy below to the file you just nano'd | |
[Unit] | |
Description=Enables zram | |
After=multi-user.target |
This file contains 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
I have made a wifi-ethernet bridge on Raspbian stretch. The trick for me was following the tips from SurferTim on this rasbperrypi forum post with a similar question to yours: https://www.raspberrypi.org/forums/viewtopic.php?t=192377 | |
Anyhow, using those guidelines that worked for me and others, here is what I would do: | |
#/etc/dnsmasq.conf | |
interface=eth1 | |
dhcp-range=192.168.2.2,192.168.2.100,12h | |
#/etc/dhcpcd.conf |
This file contains 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
# overwrite master with contents of seotweaks branch (seotweaks > master) | |
git checkout seotweaks # source name | |
git merge -s ours master # target name | |
git checkout master # target name | |
git merge seotweaks # source name |
This file contains 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
Object.prototype.toString.call(myVar) will return: | |
"[object Object]" if myVar is an object | |
"[object Array]" if myVar is an array |
This file contains 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
pm2 start app.js --interpreter ./node_modules/.bin/babel-node |
OlderNewer