Skip to content

Instantly share code, notes, and snippets.

View skylerto's full-sized avatar

Skyler Layne skylerto

View GitHub Profile
@skylerto
skylerto / -
Created February 3, 2016 23:30
echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|gawk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}'
@skylerto
skylerto / -
Last active February 3, 2016 23:32
Matrix Terminal
echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|gawk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}'
FROM ubuntu
# Update Ubuntu
RUN apt-get update && apt-get -y upgrade
# Add oracle java 7 repository
RUN apt-get -y install software-properties-common
RUN add-apt-repository ppa:webupd8team/java
RUN apt-get -y update
import java.util.*;
public class Test {
public static void main(String[] args){
List<Integer> numbers = Arrays.asList(1,2,3,4,5);
/* Lambda Functions, figures out the type */
// numbers.forEach((val) -> {
// System.out.println(val);
import Data.List
list = 1 : 1 : [a + b | (a,b) <- zip list $ tail list]
fib :: Int -> Int
fib n = last $ take n list
import Data.List
import System.IO
{-
- THE PROBLEM:
- For every real number a>1a>1 is given the sequence gaga by:
- ga(x)=1ga(x)=1 for x<ax<a
- ga(x)=ga(x−1)+ga(x−a)ga(x)=ga(x−1)+ga(x−a) for x≥ax≥a
- G(n)=gn√(n)G(n)=gn(n)
- G(90)=7564511G(90)=7564511.
(function(name, definition) {
var hasDefine = typeof define === 'function',
hasExports = typeof module !== 'undefined' && module.exports;
if (hasDefine) {
define(name, definition);
} else if (hasExports) {
module.exports = definition();
} else {
this[name] = definition();
const Timer = require('./timer.js');
/**
* This class manages 2 timers, a break timer and a task timer.
*
* @class Pomodoro
* @constructor
*/
module.exports = class Pomodoro {
// you can write to stdout for debugging purposes, e.g.
// console.log('this is a debug message');
function solution(S) {
// If there are no sentences get out quick.
if(S.length <= 0){
return 0;
}
function solution(A, B) {
if (A == B){
// Same values
return 0;
} else if(A > 0 && B > 0){
// Positive values
var left = Math.sqrt(A);
var right = Math.sqrt(B);
return (Math.floor(right) - Math.floor(left)) + 1;