Skip to content

Instantly share code, notes, and snippets.

@chase
chase / .ctags
Last active December 4, 2020 11:52 — forked from jesstelford/.ctags
--langdef=moonscript
--langmap=moonscript:.moon
--regex-moonscript=/(^|=[ \t])*class ([A-Za-z_][A-Za-z0-9_]+\.)*([A-Za-z_][A-Za-z0-9_]+)( extends ([A-Za-z][A-Za-z0-9_.]*)+)?$/\3/c,class/
--regex-moonscript=/^[ \t]*@?(([A-Za-z][A-Za-z0-9_.]*)+):.*[-=]>.*$/\1/m,method/
--regex-moonscript=/^[ \t]*(([A-Za-z][A-Za-z0-9_.]*)+)[ \t]*=.*[-=]>.*$/\1/f,function/
--regex-moonscript=/^[ \t]*(([A-Za-z][A-Za-z0-9_.]*)+)[ \t]*=[^->\n]*$/\1/v,variable/
--regex-moonscript=/^[ \t]*@(([A-Za-z][A-Za-z0-9_.]*)+)[ \t]*=[^->\n]*$/\1/p,property/
--regex-moonscript=/^[ \t]*@(([A-Za-z][A-Za-z0-9_.]*)+):[^->\n]*$/\1/s,static property/
--regex-moonscript=/^[ \t]*(([A-Za-z][A-Za-z0-9_.]*)+):[^->\n]*$/\1/p,property/
--regex-moonscript=/(new:[ \t]*\()@(([A-Za-z][A-Za-z0-9_.]*)+)([ \t]*=[ \t]*[^,)]+)?/\3/p,property/
'use strict';
// Authored 2018-10-26 Chase Colman
var Util = (function() {
/**
* combinate visitor callback
* @callback Util~combinateCallback
* @param {[]} combination - currently visited combination
* @return {boolean} - terminates combinate if true
*/
@chase
chase / gist:cc980da37005dc0d48bed7b3cdd9f4d5
Created October 5, 2016 20:14
Jest Failed Test Output
FAIL src/renderers/shared/fiber/__tests__/ReactTopLevelFragment-test.js
● ReactTopLevelFragment › should render a simple fragment at the top of a component
ReferenceError: shouldTrackSideEffects is not defined
at deleteRemainingChildren (src/renderers/shared/fiber/ReactChildFiber.js:76:8)
at reconcileChildFibers (src/renderers/shared/fiber/ReactChildFiber.js:767:12)
at reconcileChildrenAtPriority (src/renderers/shared/fiber/ReactFiberBeginWork.js:83:30)
at reconcileChildren (src/renderers/shared/fiber/ReactFiberBeginWork.js:71:5)
at updateHostComponent (src/renderers/shared/fiber/ReactFiberBeginWork.js:285:7)
@chase
chase / nginx-custom-build.sh
Created March 25, 2016 19:22
Build Ubuntu or Debian packages for nginx with custom patches, configs, and name suffixes in one command
#!/bin/bash
# Author: Alexander Rodin <rodin.alexander@gmail.com>
# License: MIT
BUILD_DIR=build
while getopts "hp:s:r:b:o:c:n" opt; do
case $opt in
h)
echo "Usage: $0 [options]"
@chase
chase / fobot_stats.py
Last active January 4, 2016 02:19
A Willie IRC Bot (http://willie.dftba.net/) module that scrapes character info off of Fallout IRC RPG (http://falloutirc.webs.com/)Requires: Python 2.7, Willie, fuzzywuzzy, and lxml
"""
fobot_stats.py - New Reno Fallout Stat Module
Copryight 2014 Chase Colman, https://gist.github.com/chase/8554277
Licensed under the MIT License
"""
# TODO: Reorganize into Classes
import re
@chase
chase / global_ycm_config.py
Created August 29, 2013 20:57
Hacky, ugly, quickly-written YCM global file that checks for an Xcode project and pulls the flags from a dry run. Works just fine, but has no fallbacks.
from os import listdir
from os.path import dirname, join
import subprocess
import vim
import ycm_core
from ycm.completers.cpp.flags import _RemoveUnusedFlags
cached_xcode_flags = {}
def MakeRelativePathsInFlagsAbsolute(flags, working_directory):
@chase
chase / highlight.js
Created October 22, 2012 18:23
Times for highlightAuto Test
function highlightAuto(text) {
var result = {
keyword_count: 0,
relevance: 0,
value: escape(text)
};
var second_best = result;
for (var key in languages) {
console.time(key); // Start timer
if (!languages.hasOwnProperty(key))
@chase
chase / .eslintrc
Created September 5, 2015 06:33
Import Plugin Breaking on Spread
{
"parser": "babel-eslint",
"plugins": [
"react",
"import"
],
"env": {
"browser": true,
"node": true
},
@chase
chase / .eslintrc
Created July 19, 2015 15:49
Import errors
{
"plugins": ["import"],
"ecmaFeatures": {
"jsx": true,
"modules": true
},
"env": {
"browser": true,
"node": true,
"es6": true
@chase
chase / fix-pkm.sh
Last active August 29, 2015 14:18
Fix Mono KPM on Linux (Add MS Certs)
# kpm restore whines about failing to write some headers, here's the non-obvious fix:
# Add Microsofts poorly signed certificates!
sudo certmgr -ssl -m https://go.microsoft.com
sudo certmgr -ssl -m https://nugetgallery.blob.core.windows.net
sudo certmgr -ssl -m https://nuget.org
mozroots --import --sync