Skip to content

Instantly share code, notes, and snippets.

module Main where
import qualified Sound.File.Sndfile as SF
import qualified Sound.File.Sndfile.Buffer.StorableVector as BV
import qualified Data.StorableVector as SV
import Debug.Trace
import Data.Array as A
import System.Environment
import DSP.Window
2418 Thread_18698427 DispatchQueue_1: com.apple.main-thread (serial)
+ 2418 start (in Spotify Helper) + 53 [0x27cf5]
+ 2418 main (in Spotify Helper) + 193 [0x344d1]
+ 2418 CefExecuteProcess(CefMainArgs const&, CefRefPtr<CefApp>, void*) (in Spotify Helper) + 145 [0x6fac1]
+ 2418 cef_execute_process (in Chromium Embedded Framework) + 251 [0x2f0efb]
+ 2418 cef_zip_reader_create (in Chromium Embedded Framework) + 138530 [0x345b92]
+ 2418 _CTFontManagerUnregisterFontForData (in Chromium Embedded Framework) + 13974674 [0x305edb2]
+ 2418 _CTFontManagerUnregisterFontForData (in Chromium Embedded Framework) + 13977808 [0x305f9f0]
+ 2418 _CTFontManagerUnregisterFontForData (in Chromium Embedded Framework) + 13975354 [0x305f05a]
+ 2418 _CTFontManagerUnregisterFontForData (in Chromium Embedded Framework) + 9388138 [0x2bff18a]
@j42
j42 / gist:30ea778117f798d1cfce
Created September 8, 2014 11:00
QueryBuilder Error
Symfony \ Component \ Debug \ Exception \ FatalErrorException (E_ERROR)
Call to a member function compileSelect() on a non-object
Open: /var/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php
/**
* Get the SQL representation of the query.
*
* @return string
*/
public function toSql()
{
'/(z[^a-zA-Z]*e[^a-zA-Z]*r[^a-zA-Z]*o[^a-zA-Z]*|o[^a-zA-Z]*n[^a-zA-Z]*e[^a-zA-Z]*|t[^a-zA-Z]*w[^a-zA-Z]*o[^a-zA-Z]*|t[^a-zA-Z]*h[^a-zA-Z]*r[^a-zA-Z]*e[^a-zA-Z]*e[^a-zA-Z]*|f[^a-zA-Z]*o[^a-zA-Z]*u[^a-zA-Z]*r[^a-zA-Z]*|f[^a-zA-Z]*i[^a-zA-Z]*v[^a-zA-Z]*e[^a-zA-Z]*|s[^a-zA-Z]*i[^a-zA-Z]*x[^a-zA-Z]*|s[^a-zA-Z]*e[^a-zA-Z]*v[^a-zA-Z]*e[^a-zA-Z]*n[^a-zA-Z]*|e[^a-zA-Z]*i[^a-zA-Z]*g[^a-zA-Z]*h[^a-zA-Z]*t[^a-zA-Z]*|n[^a-zA-Z]*i[^a-zA-Z]*n[^a-zA-Z]*e[^a-zA-Z]*|t[^a-zA-Z]*e[^a-zA-Z]*n[^a-zA-Z]*|0[\W]*|1[\W]*|2[\W]*|3[\W]*|4[\W]*|5[\W]*|6[\W]*|7[\W]*|8[\W]*|9[\W]*){5,}/i'
@j42
j42 / gist:2aae5a360624ae2a43d7
Last active August 18, 2021 05:24
PHP Standalone MGRS/USNG <-> LatLng Converter (EFFICIENT)
<?php
/**
*
* Copyright (C) 2014 J42 (Julian Aceves)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
@j42
j42 / gist:9f410e9d6bc1dfdf4492
Last active August 29, 2015 14:03
BSONID Slug
function slug($id) {
// Non/malformed mongo fallthrough
if (!MongoId::isValid($id)) return $id;
// Else... get the important bits
$time = gmp_strval(gmp_init(bin2hex(substr(pack("H*", $id), 0, 4)), 16), 10);
$rand = gmp_strval(gmp_init(bin2hex(substr(pack("H*", $id), -3)), 16), 10);
/* simplify? will this capture all possible variations?
var test = 'Hello world!';
console.log(test);