Skip to content

Instantly share code, notes, and snippets.

View schmkr's full-sized avatar

Alwin Schoemaker schmkr

View GitHub Profile
@socketz
socketz / mailcatcher
Last active January 12, 2019 12:02
Service configuration for Mailcatcher Daemon (https://github.com/sj26/mailcatcher) on systemd and init.d path. Put files in /etc/systemd/system/mailcatcher.service and /etc/init.d/mailcatcher. If you choose the mailcatcher.conf option, do not need other files, put this file in /etc/init/mailcatcher.conf.
#!/bin/sh
# Start/stop the mailcatcher daemon.
#
### BEGIN INIT INFO
# Provides: mailcatcher
# Required-Start: $local_fs $remote_fs $network $syslog $named
# Required-Stop: $local_fs $remote_fs $network $syslog $named
# Should-Start: $local_fs $remote_fs $network $syslog $named
# Should-Stop: $local_fs $remote_fs $network $syslog $named
# Default-Start: 2 3 4 5
@koenbok
koenbok / mac-tweaks.md
Last active April 23, 2022 22:37
My Favorite Mac Tweaks

Skip verifying disk images

defaults write com.apple.frameworks.diskimages skip-verify true

Always hide the Desktop

defaults write com.apple.finder CreateDesktop false; killall Finder

Make terminal logins fast

touch ~/.hushlogin

Disable most animations

@wesbos
wesbos / you-are-welcome.sh
Last active March 28, 2017 13:36
Listen to all the voices inside your Mac computer
# paste this into your console and hit enter
for voice in Agnes Kathy Princess Vicki Victoria Alex Bruce Fred Junior Ralph Albert Bad News Bahh Bells Boing Bubbles Cellos Deranged Good News Hysterical Pipe Organ Trinoids Whisper Zarvox; do say "Hi `whoami` my name is ${voice}" -v ${voice}; done
@chrismdp
chrismdp / s3.sh
Last active March 5, 2024 12:57
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump | grep -B6 bindings:.*:
@p3t3r67x0
p3t3r67x0 / pseudo_elements.md
Last active January 16, 2024 01:17
A CSS pseudo-element is used to style specified parts of an element. In some cases you can style native HTML controls with vendor specific pseudo-elements. Here you will find an list of cross browser specific pseudo-element selectors.

Styling native elements

Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element or the /deep/ path selector.

video::webkit-media-controls-timeline {
  background-color: lime;
}

video /deep/ input[type=range] {
@constellates
constellates / timeago.filter.js
Last active August 29, 2015 14:03 — forked from rodyhaddad/timeago.filter.js
A time ago filter with built in timezone conversion from a UTC time source.
.filter('timeago', function () {
/*
* time: the time
* local: compared to what time? default: now
* raw: wheter you want in a format of "5 minutes ago", or "5 minutes"
*/
// parse string date to milliseconds
// Note: months are 0-based
// Highcharts CheatSheet Part 1.
// Create interactive charts easily for your web projects.
// Download: http://www.highcharts.com/download
// More: http://api.highcharts.com/highcharts
// 1. Installation.
// Highcharts requires two files to run, highcharts.js and either jQuery, MooTools or Prototype or the Highcharts Standalone Framework which are used for some common JavaScript tasks.
// <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
// <script src="https://code.highcharts.com/highcharts.js"></script>
// variables.scss
$screen-xs-max: 767px;
$screen-sm: $screen-xs-max + 1px;
$screen-sm-max: 991px;
$screen-md: $screen-sm-max + 1px;
$screen-md-max: 1199px;
$screen-lg: $screen-md-max + 1px;
// mixins.scss
@mixin media($device, $only: false) {
@LeCoupa
LeCoupa / casperjs.cheatsheet.js
Last active January 23, 2022 07:56
Cheatsheet: CasperJS, PhantomJS & Spooky --> https://github.com/LeCoupa/awesome-cheatsheets
// PhantomJS Cheatsheet
$ brew update && brew install phantomjs // install PhantomJS with brew
phantom.exit();
var page = require('webpage').create();
page.open('http://example.com', function() {});
page.evaluate(function() { return document.title; });