Skip to content

Instantly share code, notes, and snippets.

@zehnpaard
zehnpaard / dune
Created June 10, 2019 09:31
OCaml template for menhir/ocamllex/dune indentation-aware parser
(menhir
(modules parser))
(ocamllex lexer)
(executable
(name ex))
@Mostly-BSD
Mostly-BSD / VoidLinux-On-System76_GalagoPro2.md
Last active October 22, 2021 12:39
Some Notes on Void Linux on System76 Galagopro 2.

These are some notes for running void linux on System76 Galagopro 2. Don't blindly cut-copy-paste, use your common sense.

Kernel

Some useful Kernel boot options.

In /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="splash loglevel=4 slub_debug=P page_poison=1 ec_sys.write_support=1 atkbd.reset intel_pstate=skylake_hwp psmouse.synaptics_intertouch=1 video=eDP-1:2048x1152-32@60 i915.enable_dc=2 i915.enable_guc=3 i915.modeset=1 i915.disable_power_well=0 i915.fastboot=1"
@branneman
branneman / fp-lenses.js
Last active May 17, 2023 00:56
JavaScript: Lenses (Functional Programming)
// FP Lenses
const lens = get => set => ({ get, set });
const view = lens => obj => lens.get(obj);
const set = lens => val => obj => lens.set(val)(obj);
const over = lens => fn => obj => set(lens)(fn(view(lens)(obj)))(obj);
const lensProp = key => lens(prop(key))(assoc(key));
@HactarCE
HactarCE / - Factorio - 4-lane RHD Modular Rail System.md
Last active February 28, 2024 17:13
Factorio - 4-lane RHD Modular Rail System

Factorio Modular Rail System

All blueprints are RHD (right-hand drive)

Modules are 42x42 (big electric poles overlap on neighboring modules)

Included blueprint books:

  • MRS - 2 Lane - RHD - 20 blueprints
  • MRS - 2 Lane Single - RHD - 34 blueprints
  • MRS - 4 Lane - RHD - 25 blueprints
@dux
dux / pull-request-prepare.rb
Last active March 2, 2022 19:06
prepares github pull request with full clean view of the selected files
#!/usr/bin/env ruby
# prepares github pull request with full clean view of the selected files
# to run it
# * delete some files after commit that is pushed, and leave them unstaged
# * pull-request-prepare.rb will
# * create branch-review-start with all marked files deleted
# * create branch-review-end with all marked files re-added
# * leave starting branch untouched
# * open github url for pull request
@maisano
maisano / RouteTransition.jsx
Last active September 15, 2023 07:29
Using react-motion with react-router
import React, { PropTypes } from 'react';
import { TransitionMotion, spring } from 'react-motion';
/**
* One example of using react-motion (0.3.0) within react-router (v1.0.0-rc3).
*
* Usage is simple, and really only requires two things–both of which are
* injected into your app via react-router–pathname and children:
*
* <RouteTransition pathname={this.props.pathname}>
@strobe
strobe / .emacs
Last active August 6, 2016 17:00
osx emacs config for scala
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; !! General Settings !!
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
@alanpeabody
alanpeabody / .projections.json
Last active August 29, 2015 13:56
Ember App Kit & vim-projectile
{
"app/models/*.js": {
"command": "model",
"template": [ "export default DS.Model.extend({", "});" ]
},
"app/router.js": { "command": "router"},
"app/routes/*.js": {
"command": "route",
"template": [ "export default Ember.Route.extend({", "});" ],
"alternate": "app/controllers/%s.js"
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
aws: grunt.file.readJSON(process.env.HOME + '/grunt-aws.json'),
copy: loadConfig('copy'),
concat: loadConfig('concat'),
s3: loadConfig('s3'),
dockerfiles: {
options: {
packageInstall: 'pacman -S --noconfirm "<%= package.name %><%= package.version %>"',
// or function(name, version) { return "pacman -S --noconfirm " + name + version; }