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
const http = require('http'); | |
const config = require('./config'); | |
const log = require('./log'); | |
const constants = require('./constants'); | |
const options = { | |
host: 'localhost', | |
port: config.httpPort, | |
timeout: 2000, | |
method: 'GET', |
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
const http = require('http'); | |
const config = require('./config'); | |
const log = require('./log'); | |
const constants = require('./constants'); | |
const options = { | |
host: 'localhost', | |
port: config.httpPort, | |
timeout: 2000, | |
method: 'GET', |
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
'use strict'; | |
// imports node modules | |
const express = require('express'); | |
const mongojs = require('mongojs'); | |
const bodyParser = require('body-parser'); | |
const jwt = require('jsonwebtoken'); | |
// creates Express app with JSON body parser | |
const app = new express(); | |
app.use(bodyParser.json()); |
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
Networks = new Mongo.Collection('networks'); | |
Networks.remove({}); | |
if (Meteor.isServer) { | |
Networks.allow({ | |
insert: function (userId, doc) { | |
return true; //userId === doc.userId; | |
}, | |
update: function (userId, doc, fieldNames, modifier) { | |
return true; // userId === doc.userId; |
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
# find head commit | |
git reflog | |
# now reset hard - where N is the head commit found in the reflog | |
git reset --hard HEAD@{N} |
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
// These two need to be declared outside the try/catch | |
// so that they can be closed in the finally block. | |
HttpURLConnection urlConnection = null; | |
BufferedReader reader = null; | |
// Will contain the raw JSON response as a string. | |
String forecastJsonStr = null; | |
try { | |
// Construct the URL for the OpenWeatherMap query |
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
#!/bin/bash | |
########################## | |
## Check if run as root ## | |
########################## | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi |
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
<provider | |
android:name=".providers.AssetProvider" | |
android:authorities="@string/provider_asset" | |
android:multiprocess="true" | |
android:exported="true"/> | |
<provider | |
android:name=".providers.AssetTagProvider" | |
android:authorities="@string/provider_assettags" | |
android:multiprocess="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
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |
NewerOlder