wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update -y
sudo apt-get install -y erlang erlang-nox
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 | |
set -e | |
function getHostname() | |
{ | |
local HOST='' | |
while test -z "$HOST" | |
do | |
read -p "$1 : " HOST |
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 request = require('request'); | |
var http = require('http'); | |
var express = require('express'); | |
var os = require("os"); | |
var streamoptions = { | |
url: 'https://xxxxxxx.scm.azurewebsites.net/api/logstream', | |
headers: { | |
'Authorization': 'Basic xxxxxxxxxxxxxxxxx' | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>AWS S3 File Upload</title> | |
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.1.12.min.js"></script> | |
</head> | |
<body> | |
<input type="file" id="file-chooser" /> |
#!/usr/bin/env bash
# Assuming OS X Yosemite 10.10.4
# Install XCode and command line tools
# See https://itunes.apple.com/us/app/xcode/id497799835?mt=12#
# See https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcode-select.1.html
xcode-select --install
###Icons
Name | Size |
---|---|
iphone_2x | 120x120 |
iphone_3x | 180x180 |
ipad | 76x76 |
ipad_2x | 152x152 |
android_ldpi | 36x36 |
android_mdpi | 48x48 |
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
#!/usr/bin/env ruby | |
# Install: | |
# $ cat heroku_logstalgia_formatter.rb > ~/bin/heroku_logstalgia_formatter | |
# $ chmod +x ~/bin/heroku_logstalgia_formatter | |
# Usage: | |
# $ heroku logs -t --app {app} | heroku_logstalgia_formatter | logstalgia - | |
require 'optparse' |
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
server { listen 80; | |
server_name example.com; | |
access_log /var/log/example.com/nginx.access.log; | |
error_log /var/log/example.com/nginx.error.log; | |
root /var/www/apps/example.com/public; | |
charset utf-8; | |
location / { | |
rewrite ^ https://$host$request_uri? permanent; | |
} |
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
/** | |
* Get the date and days within a week from week number. | |
* eg: date range for 8th week in 2013 is 17th Feb to 23rd Feb. This | |
* code snippet will give you. | |
* | |
* It is not my code completely, Bit of modification from something | |
* i found on net. Cant find it anymore so keeping a backup. | |
* | |
* @param {[Integer]} weekNo [From week 1 to Week 52/53 based on the system date setting] | |
* @return {[Date]} [description] |
NewerOlder