Skip to content

Instantly share code, notes, and snippets.

@slifin
slifin / config.php
Created March 19, 2020 10:28
copy to .phan/config.php
<?php
return [
'directory_list' => [
'.',
],
'suppress_issue_types' => [
'PhanUndeclaredMethod',
'PhanAccessMethodProtected',
],
<?php
require __DIR__ . '/vendor/autoload.php';
use igorw\edn;
class Param {
public $data;
function __construct($data) {
#!/usr/bin/env sh
yabai -m config mouse_follows_focus on
yabai -m config focus_follows_mouse on
yabai -m config layout bsp
yabai -m config mouse_modifier fn
yabai -m config mouse_action1 move
yabai -m config mouse_action2 resize
{
"BTTPresetName" : "chunkwm",
"BTTGeneralSettings" : {
"BTTPathSampleSize" : 100,
"BTTCMOnTop" : true,
"BTTForceForceClickPressure2F" : 700,
"BSTLeftHalfBlock" : true,
"BTTMinDrawingMovement" : 2,
"BTTTouchBarMouseModeClickBlock" : true,
"BSTRightHalfBlock" : true,
(defn php-empty? [input]
(let [read (clojure.edn/read-string (str input))]
(or
(and (number? read) (zero? read))
(not (boolean read))
(and (seqable? read) (empty? read)))))
@slifin
slifin / Send to repl
Created May 11, 2019 15:58
How to send selected text to the repl from any editor
on run {input, parameters}
tell application "Terminal"
do script (input) in window 1
end tell
return input
end run
https://i.imgur.com/C5Q4fhd.png
<?php
$data =
[':select' => [':a', ':b', [':select' => [':c']]],
':from' => [':foo']];
function recur(array $map) : object {
return new \RecursiveIteratorIterator(
new \RecursiveArrayIterator($map),
@slifin
slifin / honeysql.php
Created May 6, 2019 11:38
honeysql part 2
<?php
$data =
[':select' => [':a', ':b', [':select' => ':c']],
':from' => [':foo']];
function recur(array $map) : object {
return new \RecursiveIteratorIterator(
new \RecursiveArrayIterator($map),
@slifin
slifin / honeysql.php
Last active May 6, 2019 11:11
honeysql clone for PHP
<?php
$data =
[':select' => [':a', ':b', ':c'],
':from' => [':foo']];
function recur(array $map) : object {
return new \RecursiveIteratorIterator(
new \RecursiveArrayIterator($map),
@slifin
slifin / style.less
Created March 7, 2019 13:34
atom stylesheet for soda
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed and saved.
*
* Add your own CSS or Less to fully customize Atom.
* If you are unfamiliar with Less, you can read more about it here:
* http://lesscss.org
*/