GNUmakefile example
This file contains 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
def compute(limit): | |
d = [1] + [0] * limit | |
primes = eulerlib.primes(limit) | |
mod = 10**9 | |
Fibonnaci_numbers = [2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,17711,28657,46368] | |
for p in primes: | |
for i in range(p,limit+1): | |
d[i] += (p*d[i-p] % mod) | |
This file contains 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 | |
require 'open-uri' | |
require 'JSON' | |
require 'digest/sha2' | |
require 'pry' | |
require 'bigdecimal' | |
require 'bitcoin' # Because I need to cheat every now and then | |
# Usage: | |
# gem install pry json ffi ruby-bitcoin |
This file contains 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
####################### | |
.PHONY: super | |
super: | |
ifneq ($(shell id -u),0) | |
@echo switch to superuser | |
sudo -s | |
endif |
This file contains 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 bash -xv | |
checkbrew() { | |
if hash brew 2>/dev/null; then | |
brew install openssl@1.1 | |
true | |
else | |
#We install homebrew if not exist | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | |
checkbrew |
I hereby claim:
- I am 11-tools on github.
- I am 11tools (https://keybase.io/11tools) on keybase.
- I have a public key ASDC8iKyGgDjWDbv6oNhUoHDV6pP1KXyTo-yxf0lTP1mLwo
To claim this, I am signing this object:
This file contains 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/sh | |
# dependencies | |
echo "Installing dependencies via Homebrew (http://brew.sh)" | |
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" | |
brew update | |
brew tap homebrew/versions |
This file contains 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 | |
# Usage: githubify <gemspec_file> [username] | |
# Requires: github.name to be set for the current git project or [username] to be specified | |
# Result: creates/overwrites a file named <username>-<gemspec_file> and updates the s.name in there have the same project name format. | |
# | |
# Author: Wes Oldenbeuving | |
# E-mail: narnach@gmail.com | |
# License: MIT-LICENSE | |
class String |
This file contains 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
All actions are performed in Terminal.app. | |
1. Install Homebrew http://brew.sh/ | |
2. Install Jack (route audio tool) http://jackaudio.org/. Current stable version from official website doesn't work with | |
MacOS Sierra (I use 10.12.3) so you need to download beta version from there https://yadi.sk/d/JwT10b7v3Dm5yy. | |
After installing reboot your computer. | |
3. Install Darkice (audio streamer) via brew. |