Skip to content

Instantly share code, notes, and snippets.

@lucasbrigida
lucasbrigida / running_nightmare_headlessly_on_linux.md
Last active May 16, 2023 18:51
Running Nightmare headlessly on Linux

Installation

Installing dependencies

sudo apt-get install build-essential clang libdbus-1-dev libgtk2.0-dev \
                       libnotify-dev libgnome-keyring-dev libgconf2-dev \
                       libasound2-dev libcap-dev libcups2-dev libxtst-dev \
                       gcc-multilib g++-multilib \
                       libgtk2.0-0 libgconf-2-4 \
                       libasound2 libxtst6 libxss1 libnss3 xvfb \
@mavieth
mavieth / media-query-template.css
Last active March 2, 2025 01:11
Media Query Template for Basic CSS
/**
* Basic CSS Media Query Template
* TODO: I should probably use Sass...
* Author: Michael Vieth
* ------------------------------------------
* Responsive Grid Media Queries - 1280, 1024, 768, 480
* 1280-1024 - desktop (default grid)
* 1024-768 - tablet landscape
* 768-480 - tablet
* 480-less - phone landscape & smaller
anonymous
anonymous / andy.php
Created November 5, 2015 17:04
<?php
/*
* @author Andy Foster
* @company Sparks Interactive
* @date 4 Nov, 2015
*
* GitLab Migration Script
* We wrote this script to mass-migrate our git repositories from our local
* hosted version of Gitorious over to GitLab.

Preface:

It's useful to know the memory characteristics of different Ruby versions.

2.0 Uses less memory, but is slower - GC blocks while running

2.1 Generational GC - more memory, but faster GC meaning faster apps (split: old / young heap spaces)

2.2 Introduces incremental GC - marks in steps, reducing stop-the-world time, making OOB GC redundant.

@therealklanni
therealklanni / using-git-guppy.md
Last active September 5, 2017 09:02
Supercharge your git hooks with gulp — Introducing git-guppy

Supercharge your git hooks with gulp

Introducing git-guppy

Automate your developer workflow with git-guppy. git-guppy allows you to add git-hooks to your project repository that are automatically installed when users clone and install your repository, so you won't have to worry about developers skipping essential workflow steps and bypassing your project guidelines.

Getting Started

So let's use a unit test scenario to illustrate an example. We're going to run unit tests before every commit (pre-commit hook) and reject the commit if the tests fail (giving the developer a chance to fix their tests before committing broken code).

@gunjanpatel
gunjanpatel / amazon-ec2-ftp.md
Last active October 10, 2023 15:31
amazon ec2 LAMP and FTP installation and setup
@deanrather
deanrather / Github Web Hosting.md
Last active December 4, 2024 05:11
Free Hosting on GitHub

Free Hosting on GitHub

This guide will take you from zero webserver knowledge, to having your own free site hosted on GitHub. The only non-free bit is registering a domain name, which can be as cheap as $5/year.

This guide uses CrazyDomains as the Registrar, FreeDNS as the DNS, and GitHub as the Webserver.


1) Domain Registration and Setup

@getify
getify / gist:2b53198906d320abe650
Created March 23, 2015 17:02
ES6 highlight reel
function foo(x) { x = (typeof x != "undefined") ? x : 10; .. }
function foo(x = 10) { .. }
function foo(x,y,z) { .. }; foo.apply(null,[1,2,3]);
function foo(x,y,z) { .. }; foo(...[1,2,3]);
function foo() { var args = [].slice.call(arguments); .. }
function foo(...args) { .. }
var o = { x: 2, y: 3 }, x = o.x, y = o.y, z = (typeof o.z != "undefined") ? o.z : 10;

Git Cheat Sheet

Commands

Getting Started

git init

or

@tommymarshall
tommymarshall / custom_user_bindings.sublime-keymap
Last active April 26, 2020 01:04
Custom User Bindings for using AlignTab with ='s, =>'s, and :'s in Sublime Text
[
{
"keys": ["control+alt+;"], "command": "align_tab",
"args" : {
"user_input" : ":/f"
}
},
{
"keys": ["control+alt+="], "command": "align_tab",
"args" : {