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 | |
| 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 |
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 | |
| # | |
| # Simple script to setup github | |
| # (2013) Carlo Micieli | |
| # | |
| NONE='\x1b[00m' | |
| RED='\x1b[31m' | |
| SSH_DIR="$HOME/.ssh" |
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 express = require('express'); | |
| var sys = require('sys'); | |
| var oauth = require('oauth'); | |
| var app = express.createServer(); | |
| var _twitterConsumerKey = "YOURTWITTERCONSUMERKEY"; | |
| var _twitterConsumerSecret = "YOURTWITTERCONSUMERSECRET"; | |
| function consumer() { |
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 | |
| function usage() | |
| { | |
| cat << EOF | |
| usage $0 options | |
| This script setup a new gradle project. | |
| 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
| 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"); |
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 java.util.List; | |
| import java.util.ArrayList; | |
| public class WrapperSamples { | |
| public static void main(String[] args) { | |
| integers(); | |
| booleans(); | |
| math(); | |
| autoboxing(); | |
| overloading(); |
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
| 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); |
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 | |
| ## Constants | |
| NONE='\e[39m' | |
| RED='\e[31m' | |
| GREEN='\e[32m' | |
| CYAN='\e[36m' | |
| ### ======================================================================= ### | |
| ### HELPER FUNCTIONS ### |
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
| 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) |
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
| Ninety-Nine Haskell Problems | |
| ============================ | |
| [Original page](https://www.haskell.org/haskellwiki/H-99:_Ninety-Nine_Haskell_Problems) | |
| > import Data.List | |
| Lists | |
| ----- |
OlderNewer