Skip to content

Instantly share code, notes, and snippets.

View sliptype's full-sized avatar
💭
✨ 𝓢𝓸0𝓸0𝓸 𝓫𝓸𝓻𝓮𝓭, 𝓼𝓸𝓶𝓮𝓸𝓷𝓮 𝓘𝓜 𝓶𝓮. ✨

Sebastian Klingler sliptype

💭
✨ 𝓢𝓸0𝓸0𝓸 𝓫𝓸𝓻𝓮𝓭, 𝓼𝓸𝓶𝓮𝓸𝓷𝓮 𝓘𝓜 𝓶𝓮. ✨
View GitHub Profile
@sliptype
sliptype / gist:47468c2823944735ccccf10e510dd44f
Created January 31, 2024 19:21
Audius common unbundling - Convert to nested imports
const glob = require('glob')
const fs = require('fs')
var getDirectories = function (callback) {
glob('./mobile/src/**/*', callback)
}
const DIRECTORY = 'store'
const EXPORTS = [
'accountReducer',
struct fxProgram
{
long chunkMagic; // 'CcnK'
long byteSize; // of this chunk, excl. magic + byteSize
long fxMagic; // 'FxCk'
long version;
long fxID; // fx unique id
long fxVersion;
@sliptype
sliptype / Test.tsx
Created June 14, 2019 16:12
Testing React components using Redux Hooks with Jest
import { render, cleanup } from '@testing-library/react';
import { useSelector } from 'react-redux';
import { when } from 'jest-when';
import { getValue } from 'selectors';
jest.mock('react-redux');
afterEach(cleanup);
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>1237</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://10.211.55.4:1228/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
@sliptype
sliptype / karabiner.json
Last active August 7, 2019 18:43
Karabiner config
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
@sliptype
sliptype / Factorizations.purs
Created July 18, 2018 01:38
Multiplicative Partitions in Purescript (Purescript by Example, Chapter 4.11 Exercise 4)
module Factorizations where
import Prelude
import Control.MonadZero (guard)
import Data.Array ((..), sort, nub, snoc)
factorizations :: Int -> Array (Array Int)
factorizations = nub <<< map sort <<< factors
where
@sliptype
sliptype / keybindings.json
Created June 25, 2018 21:37
VSCode Keybindings
[
{"key":"cmd+0", "command":"workbench.action.openLastEditorInGroup"},
{"key":"cmd+1", "command":"workbench.action.openEditorAtIndex1"},
{"key":"cmd+2", "command":"workbench.action.openEditorAtIndex2"},
{"key":"cmd+3", "command":"workbench.action.openEditorAtIndex3"},
{"key":"cmd+4", "command":"workbench.action.openEditorAtIndex4"},
{"key":"cmd+5", "command":"workbench.action.openEditorAtIndex5"},
{"key":"cmd+6", "command":"workbench.action.openEditorAtIndex6"},
{"key":"cmd+7", "command":"workbench.action.openEditorAtIndex7"},
{"key":"cmd+8", "command":"workbench.action.openEditorAtIndex8"},
@sliptype
sliptype / settings.json
Created June 25, 2018 21:33
VSCode Settings
{
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": ["U"],
"after": ["<C-r>"]
}
],
"vim.statusBarColorControl": true,
"vim.statusBarColors": {
"normal": ["#00FFAE", "#434C5E"],
@sliptype
sliptype / Cycle.jsx
Created April 20, 2018 03:53
Cycle App Snippet
import xs from 'xstream'
// Intent
const intent = source => ({
// Object of action streams
})
// Model
const model = actions => {
// Return stream of state
[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+