Skip to content

Instantly share code, notes, and snippets.

View gmfc's full-sized avatar
🏠
Working from home

Gabriel Melo Correia gmfc

🏠
Working from home
View GitHub Profile

How to set up a new Production Server running Node on Ubuntu

START

Always start with an Update:

$ sudo apt-get update

Create folder for project:

$ mkdir production
@bedekelly
bedekelly / huffman.hs
Created October 23, 2016 14:34
Implementation of Huffman Coding in Haskell. N.B. this sends the frequency table, not the tree itself.
module Huffman where
import Data.List
import Data.Char
-- Extract the value from a Maybe type.
fromJust :: Maybe t -> t
fromJust (Just x) = x
fromJust Nothing = error "Can't retrive value from Nothing!"
@shrop
shrop / gist:c61bd91a48a2fddcbc71
Created May 23, 2015 15:10
Successful Jenkins run of meteor --test with Jasmine and Cucumber tests
GitHub pull request #1 of commit c777da4ad9b015e776336635b18a55485a29c900, no merge conflicts.
Setting status of c777da4ad9b015e776336635b18a55485a29c900 to PENDING with url http://jenkins.blackboot.biz:8080/job/ci-test/18/ and message: Build started, sha1 is merged
Building in workspace /var/lib/jenkins/jobs/ci-test/workspace
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://github.com/hb5co/ci-test.git # timeout=10
Fetching upstream changes from https://github.com/hb5co/ci-test.git
> git --version # timeout=10
using .gitcredentials to set credentials
> git config --local credential.helper store --file=/tmp/git4317210699226004625.credentials # timeout=10
@jareiko
jareiko / codeship-meteor-script.md
Last active March 6, 2016 00:03
Deploying to Meteor with Codeship.io

Deploying to Meteor with Codeship.io

Project structure

You'll need to use a subdirectory within your git repo for the Meteor project. This allows you to clone Meteor into your repo without it trying to deploy itself. If you find a better way, please let me know.

Provide the name of the subdirectory to the deploy script with the SUBDIRECTORY environment variable.

@osipov
osipov / gist:c2a34884a647c29765ed
Created July 21, 2014 19:12
Install Scala and SBT using apt-get on Ubuntu 14.04 or any Debian derivative using apt-get
sudo apt-get remove scala-library scala
sudo wget www.scala-lang.org/files/archive/scala-2.10.4.deb
sudo dpkg -i scala-2.10.4.deb
sudo apt-get update
sudo apt-get install scala
wget http://scalasbt.artifactoryonline.com/scalasbt/sbt-native-packages/org/scala-sbt/sbt/0.12.4/sbt.deb
sudo dpkg -i sbt.deb
sudo apt-get update
sudo apt-get install sbt
@tong
tong / beep-starwars
Created August 8, 2013 14:23
PC speaker star wars vader theme
#!/bin/bash
beep -l 350 -f 392 -D 100 --new -l 350 -f 392 -D 100 --new -l 350 -f 392 -D 100 --new -l 250 -f 311.1 -D 100 --new -l 25 -f 466.2 -D 100 --new -l 350 -f 392 -D 100 --new -l 250 -f 311.1 -D 100 --new -l 25 -f 466.2 -D 100 --new -l 700 -f 392 -D 100 --new -l 350 -f 587.32 -D 100 --new -l 350 -f 587.32 -D 100 --new -l 350 -f 587.32 -D 100 --new -l 250 -f 622.26 -D 100 --new -l 25 -f 466.2 -D 100 --new -l 350 -f 369.99 -D 100 --new -l 250 -f 311.1 -D 100 --new -l 25 -f 466.2 -D 100 --new -l 700 -f 392 -D 100 --new -l 350 -f 784 -D 100 --new -l 250 -f 392 -D 100 --new -l 25 -f 392 -D 100 --new -l 350 -f 784 -D 100 --new -l 250 -f 739.98 -D 100 --new -l 25 -f 698.46 -D 100 --new -l 25 -f 659.26 -D 100 --new -l 25 -f 622.26 -D 100 --new -l 50 -f 659.26 -D 400 --new -l 25 -f 415.3 -D 200 --new -l 350 -f 554.36 -D 100 --new -l 250 -f 523.25 -D 100 --new -l 25 -f 493.88 -D 100 --new -l 25 -f 466.16 -D 100 --new -l 25 -f 440 -D 100 --new -l 50 -f 466.16 -D 400 --new -l 25 -f 311.13 -D 200 --new -l 350 -f 369
@mbostock
mbostock / .block
Last active February 9, 2016 02:04
Rotating Orthographic
license: gpl-3.0
@ntsh
ntsh / dabblet.css
Created May 9, 2013 11:23
Simple blog layout in HTML and CSS.
body{
margin:0;
background-color: #efefef;
}
header {
font-size: 20px;
background-color: black;
color: #cccccc;
height: 75px;
}
@cy6erGn0m
cy6erGn0m / Main.java
Created June 21, 2012 14:46
Simple example jansi library
package cg;
import org.fusesource.jansi.Ansi;
import org.fusesource.jansi.AnsiConsole;
/**
* User: Sergey Mashkov
* Date: 6/21/12
*/
public class Main {
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="style.css">
</head>
<body>
<svg id="defs">
<defs>
<linearGradient id="gradBlue" x1="0%" y1="0%" x2="100%" y2="0%">