Skip to content

Instantly share code, notes, and snippets.

@odlp
odlp / jasmine_seed_reporter.js
Last active March 10, 2022 20:57
Jasmine / Karma seed reporter for random test order
var SeedReporter = function(baseReporterDecorator) {
baseReporterDecorator(this);
this.onBrowserComplete = function(browser, result) {
if (result.order && result.order.random && result.order.seed) {
this.write("%s: Randomized with seed %s\n", browser, result.order.seed);
}
};
};
@yannhowe
yannhowe / .gitlab.ci.yml
Created September 26, 2016 18:06
.gitlab.ci.yml for SSH with private key.
# Image neeeds to have ssh-client
image: docker:git
services:
- docker:dind
stages:
- staging
before_script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
@CMCDragonkai
CMCDragonkai / cygwin_or_mingw.sh
Created March 31, 2016 12:50
CLI: Detect Cygwin or MINGW
#!/usr/bin/env bash
case "$(uname --kernel-name)" in
*cygwin*|*CYGWIN*|*mingw*|*MINGW*|*msys*|*MSYS*)
echo "I'm in cygwin or mingw!"
;;
esac
@GochoMugo
GochoMugo / Readme.md
Last active January 18, 2016 11:41
Mackup configuration file for Remindme

Once you have created a remindme.cfg with the contents as shown in the file, place it in ~/.mackup.

Now, trigger a backup:

$ mackup backup
@JJediny
JJediny / gist:a466eed62cee30ad45e2
Created October 5, 2015 20:42
Jekyll Liquid Cheatsheet

There are two types of markup in Liquid: Output and Tag.

  • Output markup (which may resolve to text) is surrounded by
{{ matched pairs of curly brackets (ie, braces) }}
  • Tag markup (which cannot resolve to text) is surrounded by
@scottgwald
scottgwald / myip.sh
Last active August 29, 2015 14:27
get ip address on local 192 network (cross-platform is TODO, mac os x for now)
#! /bin/bash
ipline=$(ifconfig | grep inet | grep " 192")
ip=$(echo $ipline | sed 's/inet \([^ ]*\).*/\1/g')
echo $ip
@bnagy
bnagy / gpgmutt.md
Last active August 10, 2024 22:44
Mutt, Gmail and GPG

GPG / Mutt / Gmail

About

This is a collection of snippets, not a comprehensive guide. I suggest you start with Operational PGP.

Here is an incomplete list of things that are different from other approaches:

  • I don't use keyservers. Ever.
  • Yes, I use Gmail instead of some bespoke hipster freedom service
@iamralch
iamralch / searchr.go
Created July 11, 2015 11:50
searchr - a sample application that works with pipes
package main
import (
"bufio"
"flag"
"fmt"
"io"
"os"
"strings"
)
@nl5887
nl5887 / transfer.fish
Last active July 30, 2024 09:21
Bash and zsh alias for transfer.sh. Transfers files and directories to transfer.sh.
function transfer
if test (count $argv) -eq 0
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"
return 1
end
## get temporarily filename, output is written to this file show progress can be showed
set tmpfile ( mktemp -t transferXXX )
## upload stdin or file
@demisx
demisx / syntax.css
Last active February 20, 2020 04:32
Syntax highlighter CSS file
.highlight { background: #ffffff; }
.highlight .c { color: #999988; font-style: italic } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { font-weight: bold } /* Keyword */
.highlight .o { font-weight: bold } /* Operator */
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */