I hereby claim:
- I am bradynpoulsen on github.
- I am bradynpoulsen (https://keybase.io/bradynpoulsen) on keybase.
- I have a public key whose fingerprint is 26B1 25F3 D315 1CBE 19DF D6B3 7B5C 787E C683 192E
To claim this, I am signing this object:
| # This is a nearly identical copy and paste how I have my status indicators work in terminal | |
| export PROMPT_COMMAND=prompt | |
| function prompt { | |
| local EXIT=$? # This MUST be first to get exit code of last command | |
| # Text Colors, I chose to use tput to get my colors | |
| local BL=`tput setaf 0` # Black | |
| local RD=`tput setaf 1` # Red |
| class Project < ActiveRecord::Base | |
| belongs_to :client | |
| has_many :user_projects | |
| has_many :users, through: :users_projects | |
| end |
| function bash_prompt { | |
| local EXIT="$?" | |
| # Text Color | |
| # local BL="\\[`tput setaf 0`\\]" # Black | |
| local RD="\\[`tput setaf 1`\\]" # Red | |
| local GR="\\[`tput setaf 2`\\]" # Green | |
| local YE="\\[`tput setaf 3`\\]" # Yellow | |
| local BU="\\[`tput setaf 4`\\]" # Blue | |
| # local MA="\\[`tput setaf 5`\\]" # Magenta |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/sh | |
| ######################################################################################## | |
| # # | |
| # Created by Bradyn Poulsen # | |
| # Install using CURL: # | |
| # # | |
| # curl -L -o .git/hooks/pre-push https://git.io/vz4TW && chmod +x .git/hooks/pre-push # | |
| # # | |
| ######################################################################################## |
| php -r '$key = openssl_pkey_new(); openssl_pkey_export($key, $privateKey); echo $privateKey;' |
| <?php | |
| $user = new User; | |
| $user->email = 'foo@example.com'; | |
| $user->password_digest = password_hash('mypassword', PASSWORD_DEFAULT); | |
| $user->save(); |
| import org.gradle.jvm.tasks.Jar | |
| plugins { | |
| application | |
| kotlin(module = "jvm") | |
| } | |
| repositories { | |
| jcenter() | |
| } |
| import java.util.function.Function; | |
| import java.util.stream.Stream; | |
| public class Foo { | |
| void test() { | |
| Function<Integer, Stream<Integer>> transformer = it -> Stream.of(it * 10, it * 100, it * 1000); | |
| Stream<Integer> myInts = Stream.of(1, 2, 3); | |
| // contains [ [10, 100, 1000], [20, 200, 2000], [30, 300, 3000] ] |
| import kotlinx.coroutines.selects.select | |
| import kotlinx.coroutines.sync.Mutex | |
| class MutexPool(val pool: Set<Mutex>) { | |
| constructor(poolSize: Int) : this((1..poolSize).map { Mutex() }.toSet()) | |
| suspend inline fun <R> withLock(crossinline block: () -> R): R = select { | |
| pool.forEach { | |
| it.onLock { lockedMutex -> | |
| try { |