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
| [alias] | |
| ci = commit | |
| co = checkout | |
| st = status | |
| br = branch | |
| di = diff | |
| dis = diff --staged | |
| co = "! sh -c 'if [ -n \"$1\" ]; then git checkout \"$@\"; else git checkout $(git bl | fzf | cut -d \" \" -f 2); fi;' -" | |
| bl = -p for-each-ref --sort=-committerdate refs/heads/ --format='%(color: yellow)%(committerdate:short) %(color: white)%(refname:short)' |
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
| def get_json_from_bucket(bucket_name, item_name): | |
| s3 = boto3.resource('s3') | |
| output = StringIO.StringIO() | |
| try: | |
| s3.Bucket(bucket_name).download_fileobj(item_name, output) | |
| except botocore.exceptions.ClientError as e: | |
| if e.response['Error']['Code'] == '404': | |
| print('The object does not exist.') | |
| else: |
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 processing.core.PVector | |
| class CoroutineExample : CoroutineApp() { | |
| data class Ellipse(var position: PVector, var color: Int, var width: Float = 20f, var height: Float = 20f) | |
| private var backgroundColor = color(128f) | |
| private val ellipses = mutableListOf<Ellipse>() | |
| override fun settings() { | |
| size(500, 500) |
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
| { | |
| "type": "object", | |
| "properties": { | |
| "title": { | |
| "type": "string" | |
| }, | |
| "description": { | |
| "type": "string" | |
| }, | |
| "weight": { |
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
| using System.Collections.Generic; | |
| using UnityEngine; | |
| /// <summary> | |
| /// Encapsulates a Catmull Rom spline path | |
| /// </summary> | |
| /// todo: consider implementing the Centripedal Catmull Rom variation | |
| public class CatmullRom2D | |
| { |
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 Data.Maybe | |
| import Data.List | |
| import Data.Bits (bit, (.&.)) | |
| import Data.Map (fromList, (!)) | |
| import Control.Monad | |
| import Graphics.Gloss | |
| data Cell = Alive | Dead deriving (Eq, Ord) | |
| instance Show Cell where |
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
| using System; | |
| namespace JME.Option | |
| { | |
| public class Maybe<T> | |
| { | |
| private readonly T _t; | |
| private readonly bool _isSome; | |
| public Maybe(T t) |
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
| [RPBroadcastActivityViewController loadBroadcastActivityViewControllerWithHandler:^(RPBroadcastActivityViewController *broadcastActivityViewController, NSError *error) { | |
| broadcastActivityViewController.delegate = self; | |
| if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { | |
| broadcastActivityViewController.modalPresentationStyle = UIModalPresentationPopover; | |
| broadcastActivityViewController.popoverPresentationController.sourceRect = _broadcastButton.frame; | |
| broadcastActivityViewController.popoverPresentationController.sourceView = _broadcastButton; | |
| } |
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-alias subl "C:\Program Files\Sublime Text 3\subl" | |
| set-alias touch new-item | |
| set-alias o explorer | |
| set-alias ghub Github | |
| set-alias gh Github | |
| git config --global alias.lg "log --graph --abbrev-commit --decorate --format=format:'%C(bold white)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all" | |
| git config --global alias.co checkout | |
| git config --global alias.di diff | |
| git config --global alias.br branch | |
| git config --global alias.ci commit |
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
| alias github='open `git remote show origin | grep Fetch | sed -e '"'"'s/Fetch URL: //'"'"' -e '"'"'s/\.git//'"'"'`' |
NewerOlder