Skip to content

Instantly share code, notes, and snippets.

View julrich's full-sized avatar
🍋
squeezing!

Jonas Ulrich julrich

🍋
squeezing!
View GitHub Profile
@julrich
julrich / restart_tmux
Created November 10, 2012 16:56 — forked from leh/restart_tmux
start or restore a tmux session named after your current working directory
# Switching projects like mad?
# t: start or restore a tmux session named after your current working directory
#
# e.g. calling t in /home/project/awesome_project will reattach the tmux session named
# awesome_project or create a new one
t() { tmux attach-session -t $(pwd | awk -F/ '{print $NF}') || tmux new-session -s $(pwd | awk -F/ '{print $NF}') ; }
<!--
Derby templates are similar to Handlebars, except that they are first
parsed as HTML, and there are a few extensions to make them work directly
with models. A single HTML template defines the HTML output, the event
handlers that update the model after user interaction, and the event handlers
that update the DOM when the model changes.
As in Handlebars, double curly braces output a value literally. Derby
templates add single curly braces, which output a value and set up
model <- -> view bindings for that object.
var derby = require('derby');
var app = derby.createApp(module);
var get = app.get;
var view = app.view;
var ready = app.ready;
// ROUTES //
get('/projects', function (page, model, params) {
var projectsQuery = model.query('projects').withUrl();
@julrich
julrich / commands.sh
Last active September 30, 2016 11:02
DNS Configuration for .local Domain on OSX El Capitan
brew install dnsmasq
mkdir -p /usr/shared/etc/
echo "address=/shared/127.0.0.1" >> /usr/local/etc/dnsmasq.conf
echo "listen-address=127.0.0.1" >> /usr/local/etc/dnsmasq.conf
sudo cp "/usr/local/Cellar/dnsmasq/*/homebrew.mxcl.dnsmasq.plist" "/Library/LaunchDaemons"
sudo launchctl load -w "/Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist"
sudo -s
sudo mkdir -p /etc/resolver
sudo echo 'nameserver 127.0.0.1' > /etc/resolver/local
dscacheutil -flushcache
@julrich
julrich / init-and-rollover-test.sh
Last active November 10, 2016 12:46
Index Rollover Test
Simple test case to create an index, and test the rollover api.
Should move shards to single node before starting the shrink. Unfortunately, the settings seem to be updated correctly for the index, but no relocation is taking place.
@julrich
julrich / patternlab-handlebars-config.js
Created March 29, 2018 11:06
@pattern-lab/engine-handlebars Custom Handlebars configuration file
module.exports = function (Handlebars) {
Handlebars.registerHelper('choose', function (a, b) { return a || b; });
};
@julrich
julrich / 01-Problem Description.md
Last active December 22, 2019 19:44
Lenovo Thinkpad P52 / Nvidia Quadro P3200 / KDE Neon 5.17.4

Getting a black screen after changing graphics driver to nvidia:

sudo prime-select nvidia
reboot

Last 2 messages I'm able to observe visibly (before it apparently hanging) include one reading as follows:

PKCS#7 signature not signed with a trusted key
@julrich
julrich / lib.navSidebar.ts
Last active August 4, 2020 12:51
Fully cached TYPO3 HMENU navigation example with expAll and 'active', 'current' states
#
# Main navigation in Sidebar
#
# General idea: Don't render & cache 'active' and 'current' states in 'expAll' menu, so it becomes cacheable
# over all pages. To regain 'active' and 'current' states, the result of the cached menu is parsed by
# 'stdWrap.replacement', utilizing specific information about the resulting menu item markup to insert them.
# Use COA to decouple the stdWrap ('lib.navSidebar.stdWrap.replacement') needed for RegExp replacement from
# the cached menu ('lib.navSidebar.10'). This way the complete menu can be generically cached without current
@julrich
julrich / gist:5cf67c88994da90fcbb4fab1b2a2d477
Created April 24, 2021 19:15
Storybook + Vite Builder on Build Errorlog
info @storybook/react v6.3.0-alpha.14
info
info => Cleaning outputDir: /home/julrich/Projects/Frontend/code/kickstartDS/dist
info => Copying static files: ./legacy-instance => ./
info => Loading presets
info => Compiling manager..
vite v2.2.1 building for production...
transforming (1312) ../../@storybook/addon-essentials/node_modules/@storybook/components/dist/esm/controls/react-editable-json-tree/components/JsonArray.jsConflicting namespaces: node_modules/@storybook/client-api/dist/esm/index.js re-exports 'combineParameters' from both node_modules/@storybook/client-api/dist/esm/index.js and node_modules/@storybook/client-api/dist/esm/parameters.js (will be ignored)
transforming (1941) ../../lodash/_baseFindIndex.jsConflicting namespaces: node_modules/@storybook/addon-essentials/node_modules/@storybook/components/dist/esm/index.js re-exports 'components' from both node_modules/@storybook/addon-essentials/node_modules/@storybook/components/dist/esm/index.js and node_modules/@storybook/addon-essentials/node_mo
@julrich
julrich / demo.js
Created April 25, 2021 11:19
Difference in basePropertyOf demo vs project
function basePropertyOf(e) {
return function (t) {
return null == e ? void 0 : e[t]
}
}
var _basePropertyOf = basePropertyOf,
...
deburrLetter = _basePropertyOf(deburredLetters),