Skip to content

Instantly share code, notes, and snippets.

View amonshiz's full-sized avatar
💻

Andrew Monshizadeh amonshiz

💻
View GitHub Profile
───────┬────────────────────────────────────────────────────────────────────────
│ File: gsl.fish
───────┼────────────────────────────────────────────────────────────────────────
1 │ function gsl
2 │ git sl | less -R
3 │ end
───────┴────────────────────────────────────────────────────────────────────────
───────┬────────────────────────────────────────────────────────────────────────
│ File: gm.fish
───────┼────────────────────────────────────────────────────────────────────────
@amonshiz
amonshiz / buck-audit-ruletype-help-text-infinite-recursion.txt
Last active December 20, 2019 03:50
buck audit ruletype help text infinite recursion
$ buck audit ruletype -h
[2019-12-19 22:43:13.854][error][command:null][tid:01][com.facebook.buck.log.memory.MemoryHandler] Infinite recursion (StackOverflowError) (through reference chain: org.kohsuke.args4j.spi.StringOptionHandler["owner"]->com.facebook.buck.cli.AdditionalOptionsCmdLineParser["options"]->java.util.ArrayList[0]->org.kohsuke.args4j.spi.StringOptionHandler["owner"]->com.facebook.buck.cli.AdditionalOptionsCmdLineParser["options"]->java.util.ArrayList[0]->org.kohsuke.args4j.spi.StringOptionHandler["owner"]->com.facebook.buck.cli.AdditionalOptionsCmdLineParser["options"]->java.util.ArrayList[0]->org.kohsuke.args4j.spi.StringOptionHandler["owner"]->com.facebook.buck.cli.AdditionalOptionsCmdLineParser["options"]->java.util.ArrayList[0]->org.kohsuke.args4j.spi.StringOptionHandler["owner"]->com.facebook.buck.cli.AdditionalOptionsCmdLineParser["options"]->java.util.ArrayList[0]->org.kohsuke.args4j.spi.StringOptionHandler["owner"]->com.facebook.buck.cli.AdditionalOptionsCmdLineParser["options"]->java.u
let setTimeout = function(callback, duration) {
callback();
};
let req = new Request("https://cdnjs.cloudflare.com/ajax/libs/jsmediatags/3.9.0/jsmediatags.js");
let content = await req.loadString();
eval(content);
var fileURLs
if (args.fileURLs.length > 0) {
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Failed to create App Support directory /Users/<USER>/Library/Application Support/BetterTouchTool : Error Domain=NSCocoaErrorDomain Code=516 "The file “BetterTouchTool” couldn’t be saved in the folder “Application Support” because a file with the same name already exists." UserInfo={NSFilePath=/Users/<USER>/Library/Application Support/BetterTouchTool, NSUnderlyingError=0x61800025d6a0 {Error Domain=NSPOSIXErrorDomain Code=17 "File exists"}}'
terminating with uncaught exception of type NSException
abort() called
Process: BetterTouchTool [79715]
Path: /Applications/BetterTouchTool.app/Contents/MacOS/BetterTouchTool
Identifier: com.hegenberg.BetterTouchTool
Version: 2.071 (608)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: BetterTouchTool [79715]
User ID: 2062845401
Date/Time: 2017-04-27 09:46:26.824 -0400
@amonshiz
amonshiz / String+Localization.swift
Created November 21, 2016 13:17
String extension to simplify localization
extension String {
var localized: String {
get {
return NSLocalizedString(self, comment: "")
}
}
}
permutationWithMod :: Integer -> Integer -> Integer -> Integer
permutationWithMod numTake setSize modValue =
let nums = [(setSize - numTake + 1)..setSize]
in foldl (\acc n -> (acc * n) `mod` modValue) 1 nums
main :: IO()
main = do
setSize <- getLine
numTake <- getLine
modValue <- getLine
@amonshiz
amonshiz / LocatingRestrictionSites2.hs
Created August 16, 2015 21:38
Project Rosalind - Locating Restriction Sites 2
import Bioinformatics.DNANucleotide (DNANucleotide (..),
charToDNANucleotide)
import Bioinformatics.Utilities (getLines, reverseComplement)
import Data.List (sort)
type PotentialSite = (Int, Int)
slice :: PotentialSite -> [a] -> [a]
slice (b, l) xs = take l $ drop b xs
@amonshiz
amonshiz / Bioinformatics.Utilities.hs
Created August 16, 2015 21:34
Project Rosalind - Locating RestrictionSites
module Bioinformatics.Utilities (
getLines,
dnaToRNA,
reverseComplement
) where
import qualified Bioinformatics.DNANucleotide as D
import qualified Bioinformatics.RNANucleotide as R
getLines :: String -> IO String
module Bioinformatics.FASTA (
FASTAFormatLine(..),
buildFASTALines,
buildFASTALinesWith
) where
import qualified Bioinformatics.DNANucleotide as D
import qualified Data.List.Split as S
data FASTAFormatLine a = FASTAFormatLine { name :: String,