Skip to content

Instantly share code, notes, and snippets.

View danielpsf's full-sized avatar

Daniel Fernandes danielpsf

View GitHub Profile
I am pleased to announce the release of DataMapper 0.10.0 Release Candidate 1.
For the impatient, here are the command line instructions to install it:
Install
-------
1) Add gems.datamapper.org as a gem source:
gem sources --add http://gems.datamapper.org
@mathiasverraes
mathiasverraes / .bashrc
Created November 3, 2011 18:46 — forked from thomasvm/.bashrc
Git shortcuts
#! /bin/sh
alias gs="git status"
alias gc="git commit"
alias gr="git checkout"
alias ga="git add"
alias gl="git lola"
@mattupstate
mattupstate / app.py
Created March 15, 2012 19:08
Flask application configuration using an environment variable and YAML
os
from flask_extended import Flask
app = Flask(__name__)
app.config.from_yaml(os.join(app.root_path, 'config.yml'))
@batok
batok / paramiko_example.py
Created April 10, 2012 16:11
Paramiko example using private key
import paramiko
k = paramiko.RSAKey.from_private_key_file("/Users/whatever/Downloads/mykey.pem")
c = paramiko.SSHClient()
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
print "connecting"
c.connect( hostname = "www.acme.com", username = "ubuntu", pkey = k )
print "connected"
commands = [ "/home/ubuntu/firstscript.sh", "/home/ubuntu/secondscript.sh" ]
for command in commands:
print "Executing {}".format( command )
@mpriour
mpriour / server.js
Last active June 20, 2016 19:20
OpenShift Restify NodeJS server module
#!/bin/env node
// OpenShift NodeJS Restify Server
var restify = require('restify');
/**
* Define the basic server.
*/
exports = (function() {
// Scope.
@Integralist
Integralist / Strategy.js
Created June 8, 2013 20:16
Strategy Design Pattern in JavaScript
// Greeter is a class of object that can greet people.
// It can learn different ways of greeting people through
// 'Strategies.'
//
// This is the Greeter constructor.
var Greeter = function(strategy) {
this.strategy = strategy;
};
// Greeter provides a greet function that is going to
@atushi
atushi / How_to_use_the_CloudWatch_API_about_getting_the_JVM_info_with_proxy.sh
Last active February 27, 2018 18:53
How to use the Cloud Watch API about getting the JVM info with proxy.
#!/bin/bash
# setting for proxy
export EC2_JVM_ARGS="-Dhttp.proxySet=true -DproxyHost=YOURPROXYHOST -DproxyPort=YOURPROXYPORT"
export SERVICE_JVM_ARGS=${EC2_JVM_ARGS}
# setting for cloud watch
export AWS_CREDENTIAL_FILE=$AWS_CLOUDWATCH_HOME/credentials
export AWS_CLOUDWATCH_URL=https://monitoring.amazonaws.com
export PATH=$AWS_CLOUDWATCH_HOME/bin:$PATH
@boaglio
boaglio / Jenkins Hackathon setup-2013.txt
Last active December 29, 2015 05:39
Jenkins Hackathon setup
- Why Jenkins Hackathon setup ?
Don't waste your time installing stuff, start hacking right away!
- What should you need:
github account
Git
Java
Maven
@niksumeiko
niksumeiko / git.migrate
Last active July 19, 2024 21:32
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@sr75
sr75 / wget-jdk-oracle-install-example.txt
Last active March 16, 2023 11:28
wget command to install Oracle JAVA JDK from stupid oracle website for centos and ubuntu
http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6
# rpm
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm" \
-O jdk-7-linux-x64.rpm
# ubuntu