Skip to content

Instantly share code, notes, and snippets.

View 0b10011's full-sized avatar

Brandon Frohs 0b10011

View GitHub Profile
@enoch85
enoch85 / mysql_secure.sh
Last active August 24, 2019 03:08 — forked from Mins/mysql_secure.sh
Automating mysql_secure_installation for MySQL 5.7
#!/bin/bash
aptitude -y install expect
// Not required in actual script
MYSQL_ROOT_PASSWORD=abcd1234
SECURE_MYSQL=$(expect -c "
set timeout 10
@addyosmani
addyosmani / README.md
Last active April 2, 2024 20:18 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@magnetikonline
magnetikonline / README.md
Last active April 30, 2024 00:45
Setting Nginx FastCGI response buffer sizes.

Syntax

This proposal introduces a new text-kerning property:

text-kerning: [ <upoint> <upoint> <length> ] #

The <upoint> pairs are the left and right code points of a kerning pair and <value> is the kern value. Kerning pairs and values can be repeated multiple times by separating them with a comma. Kerning is applied to all unicode code point pairs in an element that match the kerning pairs specified in the text-kerning property of that element.

@ssp
ssp / git-extract-file.markdown
Created January 23, 2012 13:21
Extract a single file from a git repository

How to extract a single file with its history from a git repository

These steps show two less common interactions with git to extract a single file which is inside a subfolder from a git repository. These steps essentially reduce the repository to just the desired files and should performed on a copy of the original repository (1.).

First the repository is reduced to just the subfolder containing the files in question using git filter-branch --subdirectory-filter (2.) which is a useful step by itself if just a subfolder needs to be extracted. This step moves the desired files to the top level of the repository.

Finally all remaining files are listed using git ls, the files to keep are removed from that using grep -v and the resulting list is passed to git rm which is invoked by git filter-branch --index-filter (3.). A bit convoluted but it does the trick.

1. copy the repository to extract the file from and go to the desired branch

@nfeldman
nfeldman / gist:1066301
Created July 6, 2011 00:48
GreaseMonkey userscript to add a modal "front end" HTML editor to any node on a Drupal site
// ==UserScript==
// @name Front End Editor
// @namespace NSF
// @include http://the.devsite.com/*
// ==/UserScript==
/**
* @copyright 2011 Noah Feldman all rights reserved
* @author Noah Feldman
* @depends a good browser