Skip to content

Instantly share code, notes, and snippets.

View killerswan's full-sized avatar

Kevin Cantú killerswan

View GitHub Profile
@sagnibak
sagnibak / tco.py
Last active April 19, 2021 05:44
Implementation of a tail-call optimizing function decorator and accompanying types in Python.
from dataclasses import dataclass, field
from typing import Any, Callable, Dict, Generic, Optional, Tuple, TypeVar, Union
ReturnType = TypeVar("ReturnType")
@dataclass
class TailCall:
args: Tuple[Any, ...] = field(default_factory=tuple)
@lattner
lattner / TaskConcurrencyManifesto.md
Last active November 18, 2024 17:28
Swift Concurrency Manifesto
@brandondurham
brandondurham / styles.less
Last active June 24, 2024 14:48
Using Operator Mono in Atom
/**
* Using Operator Mono in Atom
*
* 1. Open up Atom Preferences.
* 2. Click the “Open Config Folder” button.
* 3. In the new window’s tree view on the left you should see a file called “styles.less”. Open that up.
* 4. Copy and paste the CSS below into that file. As long as you have Operator Mono SSm installed you should be golden!
* 5. Tweak away.
*
* Theme from the screenshot (http://cdn.typography.com/assets/images/blog/operator_ide2.png):

We're excited to have you attend one of our workshops! Here's a JavaScript (re)fresher to help you get up-to-speed on some features of the language we'll be using.

Let and Const

JavaScript has always had var:

var name = 'Ryan'
@rolebi
rolebi / .travis.yml
Last active May 8, 2018 12:08
Travis AWS codedeploy fail build if deployment fail
env:
global:
# implement your own logic in get_env_for_git_reference.sh
- TARGET_ENV="`test $TRAVIS_TAG && ./get_target_env_for_git_reference.sh $TRAVIS_TAG`"
# ENV integration
- AWS_INTEGRATION_APPLICATION=xxxx
- AWS_INTEGRATION_DEPLOYMENT_GROUP=xxxx
- AWS_INTEGRATION_REGION=xxxx
#AWS_INTEGRATION_ACCESS_KEY
@FeodorFitsner
FeodorFitsner / update-global-assemblyinfo.ps1
Created January 6, 2016 23:04
Update global assemblyinfo with build number
$assemblyFile = "$env:APPVEYOR_BUILD_FOLDER\src\GlobalAssemblyInfo.cs"
$regex = new-object System.Text.RegularExpressions.Regex ('(AssemblyInformationalVersion(Attribute)?\s*\(\s*\")(.*)(\"\s*\))',
[System.Text.RegularExpressions.RegexOptions]::MultiLine)
$content = [IO.File]::ReadAllText($assemblyFile)
$version = $null
$match = $regex.Match($content)
if($match.Success) {

Screencapture and animated gifs

I say "animated gif" but in reality I think it's irresponsible to be serving "real" GIF files to people now. You should be serving gfy's, gifv's, webm, mp4s, whatever. They're a fraction of the filesize making it easier for you to deliver high fidelity, full color animation very quickly, especially on bad mobile connections. (But I suppose if you're just doing this for small audiences (like bug reporting), then LICEcap is a good solution).

Capturing (Easy)

  1. Launch quicktime player
  2. do Screen recording

screen shot 2014-10-22 at 11 16 23 am

@dysinger
dysinger / idris
Last active August 29, 2015 13:56
HELP I'M NEW TO HASKELL AND CABAL IS KILLING ME!!!
# REMOVE ANYTHING CABAL HAS EVER DROPPED ONTO YOUR SYSTEM
rm -rf ~/.{ghc,cabal}
# UPDATE CABAL
cabal update
# UPGRADE CABAL TO 1.18 (BECAUSE THEY ADDED SANDBOXES)
cabal install cabal-install
export PATH=~/.cabal/bin:$PATH ;# PUT THIS IN YOUR PROFILE