Skip to content

Instantly share code, notes, and snippets.

@asmod3us
asmod3us / killring.plugin.zsh
Created October 3, 2021 16:42 — forked from retrography/killring.plugin.zsh
OH-MY-ZSH Custom Plugin -- Redefines the most used kill ring bindings to sync with the system clipboard (requires clipcopy plugin)
kill-line() { zle .kill-line ; echo -n $CUTBUFFER | clipcopy }
zle -N kill-line
bindkey "^K" kill-line
kill-whole-line() { zle .kill-whole-line ; echo -n $CUTBUFFER | clipcopy }
zle -N kill-whole-line
bindkey "^U" kill-whole-line
yank() { LBUFFER=$LBUFFER$(clippaste) }
zle -N yank
@asmod3us
asmod3us / build-daapd.sh
Created May 28, 2020 17:47
forked-daapd build on freenas 11.3 with recent ffmpeg
#!/usr/bin/env bash
set -o errexit # Exit on most errors
set -o errtrace # Make sure any error trap is inherited
set -o nounset # Disallow expansion of unset variables
set -o pipefail # Use last non-zero exit code in a pipeline
trap "ERR during daapd build" ERR
# see config.yml for packages

Keybase proof

I hereby claim:

  • I am asmod3us on github.
  • I am asmod3us (https://keybase.io/asmod3us) on keybase.
  • I have a public key ASAn9XBMtuv8SipQVi7QIjXZ4oii8huJK9qilyJn7YI2IQo

To claim this, I am signing this object:

@asmod3us
asmod3us / git-blame-colored
Created February 29, 2016 10:12 — forked from lwalen/git-blame-colored
A fancy git blame. Presents code with initials of author to the left. Colors author's names and initials for easy blaming.
#!/usr/bin/env ruby
# Colorize string
class String
def colorize(color_code)
"\e[#{color_code}m#{self}\e[0m"
end
end
class Colors
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name=$inputline
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url=$inputline
@asmod3us
asmod3us / wintersmith-nap.coffee
Created August 16, 2014 13:24
wintersmith-nap fix for contents path not found
nap = require 'nap'
path = require 'path'
module.exports = (env, callback) ->
preview = 'preview' == env.mode
roots =
contents: env.config.contents
output: env.config.output
# Reading config from wintersmith config object (config.json)
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<polymer-element name="my-element">
<template>
@asmod3us
asmod3us / hybrid.js
Last active December 17, 2015 20:48
How to issue touch and other gestures with appium in a hybrid app?
"use strict";
var wd = require("wd"),
should = require("should"),
appURL = "http://appium.s3.amazonaws.com/WebViewApp6.0.app.zip";
// Instantiate a new browser sessoin
var browser = wd.remote("localhost", 4723);
// See whats going on
@asmod3us
asmod3us / test.js
Last active December 17, 2015 16:09
using selenium-webdriver and mocha
var webdriver = require('selenium-webdriver'),
client = new webdriver.Builder().withCapabilities({'browserName': 'phantomjs'}).build(),
chai = require('chai'),
assert = chai.assert,
should = chai.should(),
expect = chai.expect;
describe('Test main page', function(){
before(function(done) {