Skip to content

Instantly share code, notes, and snippets.

View nidhhoggr's full-sized avatar
🌚

Joseph Persico nidhhoggr

🌚
View GitHub Profile
function sendXmlFile($outfile) {
$ch = curl_init();
$url = "http://dev.usa911.us/synch/scripts/write.php";
$data = array('file' => $outfile);
$handle = curl_init($url);
curl_setopt($handle, CURLOPT_POST, true);
@nidhhoggr
nidhhoggr / gist:7641919
Created November 25, 2013 14:24
Test schema modification suggestion
In order for Fieldset to have an objectId should something like the following exist:
var Fieldset = module.exports = new Schema({
name: { type: String, required: true },
key: { type: String, required: true },
repeatable: { type: Boolean, default: false },
ordinal: { type: Number }
});
@nidhhoggr
nidhhoggr / gist:7669511
Created November 27, 2013 01:55
underscore titleize humanize
var _ = require('underscore');
// Import Underscore.string to separate object, because there are conflict functions (include, reverse, contains)
_.str = require('underscore.string');
// Mix in non-conflict functions to Underscore namespace if you want
_.mixin(_.str.exports());
// All functions, include conflict, will be available through _.str object
_.str.include('Underscore.string', 'string'); // => true
@nidhhoggr
nidhhoggr / gist:7739811
Created December 1, 2013 19:36
pluralization method
pluralize = function(str) {
str = str + 's';
if(_.string.endsWith(str,'ys'))
str = str.replace('ys','ies')
return str;
}
(function () {
'use strict';
angular
.module('com.module.core')
.service('MapService', function () {
var rad = function(x) { return x*Math.PI/180;}
var distHaversine = function(latLngBounds) {
var R = 6371; // earth's mean radius in km
UPLOAD_ENABLED = True
S3_USE_SIGV4 = True
LOADER = 'tc_aws.loaders.s3_loader'
STORAGE = 'tc_aws.storages.s3_storage'
RESULT_STORAGE = 'tc_aws.result_storages.s3_storage'
RESULT_STORAGE_STORES_UNSAFE = True
ethos 8588 1 0 00:06 ? 00:00:00 /usr/bin/SCREEN -c /opt/ethos/etc/screenrc.claymore -l -L -dmS claymore /opt/miners/claymore/claymore -esm 0 -eworker 71daf1 -dbg -1 -wd 0 -colors 0 -allcoins 1 -allpools 1 -gser 2 -epool stratum+tcp://pool-usa.ethosdistro.com:5001 -ewal 0x62daeFB38BD2a7996975C362e711ACCf4A56EDF3 -epsw x -epool stratum+tcp://pool-eu.ethosdistro.com:5001 -ewal 0x62daeFB38BD2a7996975C362e711ACCf4A56EDF3 -epsw x
ethos 8589 8588 4 00:06 pts/3 00:00:25 /opt/miners/claymore/claymore -esm 0 -eworker 71daf1 -dbg -1 -wd 0 -colors 0 -allcoins 1 -allpools 1 -gser 2 -epool stratum+tcp://pool-usa.ethosdistro.com:5001 -ewal 0x62daeFB38BD2a7996975C362e711ACCf4A56EDF3 -epsw x -epool stratum+tcp://pool-eu.ethosdistro.com:5001 -ewal 0x62daeFB38BD2a7996975C362e711ACCf4A56EDF3 -epsw x
yum updtate -y
yum install curl wget vim npm
wget -qnc https://repo.nordvpn.com/yum/nordvpn/centos/noarch/Packages/n/nordvpn-release-1.0.0-1.noarch.rpm
yum install nordvpn-release-1.0.0-1.noarch.rpm
curl -sL https://rpm.nodesource.com/setup_10.x | sudo bash -
yum install nodejs
npm install n yarn -g
n stable
yum install nordvpn