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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>AlternateMouseScroll</key> | |
<true/> | |
<key>AppleAntiAliasingThreshold</key> | |
<integer>1</integer> | |
<key>AppleScrollAnimationEnabled</key> | |
<integer>0</integer> |
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
set nocompatible | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required |
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
. /etc/bashrc | |
prompt() { | |
extra=2 | |
PS1=$(printf "\n%*s\r%s\n>>> " "$(expr $(tput cols) - ${#PWD} + $(if [[ $PWD/ = "$HOME"/* ]]; then echo ${#HOME} - 1; else echo 0; fi) + $extra )" '[ \w ]' '\u@\h') | |
} | |
PROMPT_COMMAND=prompt | |
. ~/.functions | |
. ~/.aliases |
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
#!/usr/bin/env ruby | |
height = %x{ tput lines }.to_i - 3 # -3 for PS1 | |
width = %x{ tput cols }.to_i | |
scale = 0.6 * width.to_f / height.to_f | |
definition = 40 | |
def calculate a, b, c_arr | |
ca, cb = c_arr |
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 | |
ORIGIN=$(pwd) | |
REPOROOT="$1" | |
if [ -z "$1" ]; then | |
REPOROOT="$HOME/Git" | |
if ! [ -d "$REPOROOT" ]; then | |
REPOROOT="$HOME/git" | |
fi | |
if ! [ -d "$REPOROOT" ]; then |
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
require 'matrix' | |
class Sphere | |
def initialize(shine, shineFocus, mood, r) | |
@shades = ['.', ':', '|', '*' 'o', 'e', '&', '%', '#', '@'] | |
@shine = shine.normalize | |
@shineFocus = shineFocus | |
@mood = mood | |
@r = r |
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
#include <iostream> | |
#include <cmath> | |
#include <string> | |
using namespace std; | |
void starCross(int n) { | |
float half = (float)n * 0.5; | |
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
require "./matrix.cr" # from https://github.com/Exilor/matrix.git the src.matrix.cr file -> https://github.com/Exilor/matrix/blob/master/src/matrix.cr | |
require "big_int" | |
require "benchmark" | |
def fib(n : BigInt) | |
return 0 if n == 0 | |
return 1 if n <= 2 | |
number = Matrix.rows([[BigInt.new(1), BigInt.new(1)], [BigInt.new(1), BigInt.new(0)]]) |
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
require "time" | |
require "big_int" | |
def primesArray(n : UInt64) | |
primedex = [false, false] of Bool | |
primedex += [true] * (n - 1) | |
(2_u64..n).each do |i| | |
(2_u64..n).each do |j| | |
begin |
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
require "stumpy_png" | |
include StumpyPNG | |
width = 361 | |
height = 101 | |
spectrum = Canvas.new(width, height) | |
(0..width - 1).each do |x| | |
(0..height - 1).each do |y| | |
# RGBA.from_hsla_n(hue, saturation, lightness, alpha) is an internal helper method | |
color = RGBA.from_hsl([x, 64, y]) # Here from_hsl(x, 100, y) would work exactly the same |