Skip to content

Instantly share code, notes, and snippets.

View gmemstr's full-sized avatar
🏳️‍🌈
Free hugs!

Gabriel Simmer gmemstr

🏳️‍🌈
Free hugs!
View GitHub Profile

Moved to repo: /quenhus/uBlock-Origin-dev-filter

In order to keep filters up to date, please use this repo.

@mschwaig
mschwaig / sway.nix
Last active March 17, 2024 16:45
Configure sway as the window manager for NixOS with gdm as the display manager
{ config, pkgs, lib, ... }:
{
# This sway config is mostly based on https://nixos.wiki/wiki/Sway
# which integrates sway with systemd in the style described here
# https://github.com/swaywm/sway/wiki/Systemd-integration
# and the replies in https://github.com/NixOS/nixpkgs/issues/57602
# with some individual packages added/removed and using sddm as the display manager.
#
# Take care to start the correct target as described by the sway proejct wiki.
@hjertnes
hjertnes / doom.txt
Created April 6, 2018 08:28
Doom Emacs Cheatsheet
SPC
SPC: find file
, switch buffer
. browse files
: MX
; EX
< switch buffer
` eval
u universal arg
x pop up scratch
#!/usr/bin/env bash
set -o xtrace -o errexit -o pipefail -o nounset
########################################################################################
# CircleCI's current recommendation for roughly serializing a subset
# of build commands for a given branch
#
# circle discussion thread - https://discuss.circleci.com/t/serializing-deployments/153
# Code from - https://github.com/bellkev/circle-lock-test
@marians
marians / import.py
Created March 16, 2017 13:09
Migrating a Ghost blog database to Jekyll
# coding: utf8
"""
This script helps to import content from a Ghost blog database to Jekyll.
The database is expected to be running on a reachalbe MySQL host.
See the very end for DB configuration.
Quick Usage:
pip install -r requirements
@gmemstr
gmemstr / skeleton-grid.css
Created July 1, 2016 18:54
Skeleton's Grid System
/* Pulled from Skeleton by dhg https://github.com/dhg/Skeleton/
Literally just the grid system and small utilities,
you're expected to write your own CSS. */
/* Grid
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.container {
position: relative;
width: 100%;
@aczietlow
aczietlow / selenium-php-webdriver-cheatsheet.md
Last active March 6, 2024 22:48 — forked from huangzhichong/selenium-webdriver-cheatsheet.md
Cheat sheet for using php webdriver (facebook/webdriver).

Webdriver PHP API workthough

  • Open a browser

    # start an instance of firefox with selenium-webdriver
    
    $browser_type = 'firefox'
    $host = 'http://localhost:4444/wd/hub'
    

$capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => $browser_type);

@emdeesee
emdeesee / codec.clj
Created October 3, 2012 14:52
Encode and decode "binary" strings with Clojure
(use '[clojure.string :only [trim replace]]
'[clojure.pprint :only [cl-format] :rename {cl-format format}])
(defn- unspace [s]
(trim (replace s " " "")))
(defn decode [bitstring]
"\"01100110 01101111 01101111\" -> \"foo\"
Whitespace in the input string is ignored."
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 23, 2024 15:29
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@lizconlan
lizconlan / CouchDB security - prevent non-admins from editing
Created July 26, 2010 12:37
CouchDB security - prevent non-admins from editing
function(newDoc, oldDoc, userCtx) {
if (userCtx.roles.indexOf('_admin') !== -1) {
return;
} else {
throw({forbidden: 'Only admins may edit the database'});
}
}