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
| aws = require ('aws-lib') | |
| access_key_id = "<Your access key id>" | |
| secret_access_key = "<Your secret access key>" | |
| options = { | |
| "path" : "<Your queue URL, just the /accountid/queue_name is needed>" | |
| } | |
| sqs = aws.createSQSClient(access_key_id, secret_access_key, options) |
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 httpProxy = require('http-proxy'), | |
| staticDir = 'app', | |
| apiHost = '<Your API Host>', | |
| apiPort = 80, | |
| apiPath = '/api'; | |
| var proxy = new httpProxy.RoutingProxy(); | |
| connect() | |
| .use(connect.logger("dev")) | |
| .use(function (req, res, next) { |
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 'rubygems' | |
| require "aws-sdk" | |
| require "yaml" | |
| #To load the configuration file | |
| CONFIG = YAML.load_file("config.yml") unless defined? CONFIG | |
| #This is for Foreman can properly get the output. | |
| $stdout.sync = true |
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 'rubygems' | |
| require 'em-websocket' | |
| require 'yajl' | |
| require 'haml' | |
| require 'sinatra/base' | |
| require 'thin' | |
| EventMachine.run do | |
| class App < Sinatra::Base | |
| get '/' do |
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
| #!/bin/bash | |
| # declare variables | |
| SERVER="<SERVER IP/NAME>" | |
| USER="<YOU USER NAME>" | |
| INNER_IP="<IP OF THE SYSTEM YOU WANT TO CONNECT TO>" | |
| PORT="<PORT YOU WANT TO USE>" | |
| #print variable on a screen | |
| echo Connecting to $SERVER and opening $PORT to $INNER_IP | |
| ssh $USER@$SERVER -CNL $PORT:$INNER_IP:$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
| jQuery(function($) { | |
| function gotAssertion(assertion) { | |
| // got an assertion, now send it up to the server for verification | |
| if (assertion !== null) { | |
| $.ajax({ | |
| type: 'POST', | |
| url: '/auth/login', | |
| data: { assertion: assertion }, | |
| success: function(res, status, xhr) { | |
| window.location.reload(); |
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
| import 'package:http/http.dart' as http; | |
| import 'dart:json' as JSON; | |
| import 'package:intl/date_symbol_data_local.dart'; | |
| import 'package:intl/intl.dart'; | |
| DateTime getDate(String input) { | |
| var dateFormat = new DateFormat("yyyyMMddHm"); | |
| return dateFormat.parse(input); | |
| } |
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
| import 'package:intl/intl.dart'; | |
| void main() { | |
| var dateFormat = new DateFormat("yyyyMMddHHmm"); | |
| DateTime now = new DateTime.now(); | |
| String strDate = dateFormat.format(now); | |
| print("Input DateTime is ${now}, which formats to ${strDate}"); | |
| try { |
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 "rubygems" | |
| require "twitter" | |
| require 'geokit' | |
| username = "amscotti" | |
| friends_list = Twitter.friends(username) | |
| friends_list.users.each do |friend| | |
| puts "----------------------------" | |
| unless friend.location.nil? || friend.location.strip.empty? |
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 'net/http' | |
| require 'net/https' | |
| require 'base64' | |
| http = Net::HTTP.new('go.netatlantic.com', 82) | |
| http.use_ssl = false | |
| path = '/' | |
| # SOAP Envelope | |
| data = <<-EOF |