Skip to content

Instantly share code, notes, and snippets.

View CarloMicieli's full-sized avatar
🦀
rust

Carlo Micieli CarloMicieli

🦀
rust
View GitHub Profile
#!/bin/bash
echo 'Starting setup...'
echo 'Adding repositories..'
sudo add-apt-repository -y ppa:tiheum/equinox
sudo add-apt-repository -y ppa:openshot.developers/ppa
## Ubuntu tweaks
sudo add-apt-repository -y ppa:tualatrix/ppa
#!/bin/bash
#
# Simple script to setup github
# (2013) Carlo Micieli
#
NONE='\x1b[00m'
RED='\x1b[31m'
SSH_DIR="$HOME/.ssh"
var express = require('express');
var sys = require('sys');
var oauth = require('oauth');
var app = express.createServer();
var _twitterConsumerKey = "YOURTWITTERCONSUMERKEY";
var _twitterConsumerSecret = "YOURTWITTERCONSUMERSECRET";
function consumer() {
#!/bin/bash
function usage()
{
cat << EOF
usage $0 options
This script setup a new gradle project.
OPTIONS:
import java.util.ArrayList;
import java.util.Arrays;
import java.util.ListIterator;
import java.util.Iterator;
import java.util.List;
public class ArrayListSamples {
public static void main(String[] args) {
ArrayList<String> a = new ArrayList<>();
a.add("zero");
import java.util.List;
import java.util.ArrayList;
public class WrapperSamples {
public static void main(String[] args) {
integers();
booleans();
math();
autoboxing();
overloading();
public class ReferenceSamples {
public static void main(String[] args) {
references();
equality();
}
private static void equality() {
Integer i1 = 1;
int i2 = i1;
assert i1 == i2 && i1.equals(i2);
@CarloMicieli
CarloMicieli / install-ubuntu.sh
Last active May 6, 2017 08:11
Installation script for Ubuntu 16.04
#!/bin/bash
## Constants
NONE='\e[39m'
RED='\e[31m'
GREEN='\e[32m'
CYAN='\e[36m'
### ======================================================================= ###
### HELPER FUNCTIONS ###
twoLargest :: (Num a, Ord a) => a -> a -> a -> (a, a)
twoLargest x y z
| x <= y && x <= z = (y, z)
| y <= x && y <= z = (x, z)
| otherwise = (x, y)
square :: (Num a) => a -> a
square x = x * x
squarePair :: (Num a) => (a, a) -> (a, a)
@CarloMicieli
CarloMicieli / p99.lhs
Last active August 29, 2015 14:14
99 haskell problems
Ninety-Nine Haskell Problems
============================
[Original page](https://www.haskell.org/haskellwiki/H-99:_Ninety-Nine_Haskell_Problems)
> import Data.List
Lists
-----