This file contains hidden or 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
| { | |
| "server": { | |
| "ip": "203.33.121.111", | |
| "port": "2302", | |
| "steam_port": "2303" | |
| }, | |
| "mods": [{ | |
| "name": "WSWeapons", | |
| "display_name": "HLC Weapons", | |
| "magnet": "magnet:?xt=urn:btih:sug2fqalfwvgvrvtctn2ysi5f3vzhrjy&dn=weapons.7z&tr=udp%3A%2F%2Fopen.demonii.com%3A1337", |
This file contains hidden or 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 = require( 'socket.io' ); | |
| var express = require( 'express' ); | |
| var http = require( 'http' ); | |
| var mysql = require( 'mysql' ); | |
| var app = express(); | |
| var server = http.createServer( app ); | |
| var io = socket.listen( server ); |
This file contains hidden or 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
| function randomPosts(count, callback) { | |
| entry.count(function (err, count) { | |
| if(err) return callback(err); | |
| async.times(count, function(n, done) { | |
| var r = Math.floor(Math.random() * count); | |
| entry.find({}, null, {limit: 1, skip: r}, function(err, post) { | |
| if(err) return done(err); | |
| return done(null, post[0].content); | |
| }); |
This file contains hidden or 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
| function maxThrough(max) { | |
| var b=0; | |
| return through2(function(chunk,enc,callback) { | |
| b+=chunk.length; | |
| if(b>max) return callback(new Error('Too many bites!')); | |
| this.push(chunk); | |
| callback(); | |
| }; | |
| } |
This file contains hidden or 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 express = require('express'); | |
| var nodemailer = require('nodemailer'); | |
| var app = express(); | |
| var port = process.env.PORT || 8300; | |
| app.listen(port, function(){ | |
| console.log('Server is listening on ' + port); | |
| }); |
This file contains hidden or 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('http').request('http://www.google.com', function(res) { | |
| res.pipe(require('through2')()).pipe(process.stdout); | |
| }).end(); |
This file contains hidden or 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
| [ | |
| { | |
| "id": 22298373, | |
| "name": "AfterLands", | |
| "full_name": "karan/AfterLands", | |
| "owner": { | |
| "login": "karan", | |
| "id": 3261985, | |
| "avatar_url": "https://avatars.githubusercontent.com/u/3261985?v=3", | |
| "gravatar_id": "", |
This file contains hidden or 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
| CREATE OR REPLACE VIEW form_details AS | |
| SELECT fd.id, fd.template_version_id, fd.agency_id, fd.user_id, fd.name, | |
| fd.template, fd.deleted, fd.finalised, fd.archived, fd.private, fd.generate, | |
| fd.created, fd.updated, fd.archive_name, fd.parent_id, fd.signed, | |
| fd.template_cost, fd.template_instruction_pages, fd.template_id, | |
| fd.template_name, fd.template_orientation, | |
| CASE | |
| WHEN array_upper(fd.avids, 1) = 1 AND fd.avids[1] IS NULL THEN ARRAY[]::integer[] | |
| ELSE fd.avids | |
| END AS template_version_ids |
This file contains hidden or 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
| function export_connect_csv(user_id, res){ | |
| ConnectModel.mysqlPool.getConnection(function(err, connection){ | |
| res.header('Content-Type', 'text/csv'); | |
| var csv_header_row = "Email,First Name,Last Name,Status,Created\n"; | |
| res.write(csv_header_row); | |
| var query = connection.query('SELECT * FROM connects where user_id = ? AND deleted = 0', [user_id]); | |
| query | |
| .on('error', function(err) { |
This file contains hidden or 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
| Vagrant.configure("2") do |config| | |
| config.vm.box = "precise64" | |
| config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
| config.vm.network :private_network, ip: "192.168.100.1" | |
| config.vm.provision :shell, :path => "vagrant/bootstrap.sh" | |
| end |
NewerOlder