Skip to content

Instantly share code, notes, and snippets.

Avatar
✌️

Chris Bracco cbracco

✌️
View GitHub Profile
View markdown-pygments-syntax-highlighting-test.md

Bash

#!/bin/bash

cd $ROOT_DIR
DOT_FILES="lastpass weechat ssh Xauthority"

for dotfile in $DOT_FILES; do conform_link "$DATA_DIR/$dotfile" ".$dotfile"; done
@cbracco
cbracco / gist:7ec99d9da5e2a8ac8ed8
Created Mar 11, 2015
Convert MP4 to WEBM & OGV using ffmpeg on OSX
View gist:7ec99d9da5e2a8ac8ed8
ffmpeg -i app/_assets/videos/bg-home-team.mp4 -an -qmax 25 -threads 2 app/_assets/videos/bg-home-team.webm
ffmpeg -i app/_assets/videos/bg-home-team.mp4 -an -c:v libtheora -q:v 7 -threads 2 app/_assets/videos/bg-home-team.ogv
@cbracco
cbracco / Instant text editor in the browser
Last active Dec 17, 2016
A fun little script you paste into your browser's address bar for an instant, no-frills text editor.
View Instant text editor in the browser
data:text/html, <body contenteditable style="background-color: #f8f3e8;font-family:Garamond, Georgia, serif;font-size:1.333rem;line-height:1.5;max-width:36rem;margin:0 auto;padding:3rem 1.5rem;">
View keybase.md

Keybase proof

I hereby claim:

  • I am cbracco on github.
  • I am cbracco (https://keybase.io/cbracco) on keybase.
  • I have a public key whose fingerprint is EF4A 7274 72A4 0D3B 7E3E 3A3F C88D EC30 C4E8 DB60

To claim this, I am signing this object:

@cbracco
cbracco / defaults.css
Created Mar 11, 2016
Example CSS variable defaults
View defaults.css
/**
* Custom Properties
*/
:root {
/* Breakpoints */
--breakpoint-xxs: 320px;
--breakpoint-xs: 480px;
@cbracco
cbracco / WordPress nginx rewrites
Last active Dec 20, 2015
Include these in your Nginx config, before the PHP fastcgi block (location ~ \.php$).
View WordPress nginx rewrites
location ~ ^/assets/(img|js|css)/(.*)$ {
try_files $uri $uri/ /wp-content/themes/yourthemename/assets/$1/$2;
}
location ~ ^/plugins/(.*)$ {
try_files $uri $uri/ /wp-content/plugins/$1;
}
View gist:495db602d77ccca45ee5
<!DOCTYPE html>
<!--[if lt IE 9]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if IE 9]> <html class="no-js lt-ie10 ie9"> <![endif]-->
<!--[if gt IE 9]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<!-- Meta -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="ClearType" content="true">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@cbracco
cbracco / .maintenance
Created Feb 6, 2014
WordPress Maintenance Mode
View .maintenance
<?php
function is_user_logged_in() {
$loggedin = false;
foreach ( (array) $_COOKIE as $cookie => $value ) {
if ( stristr($cookie, 'wordpress_logged_in_') )
$loggedin = true;
}
return $loggedin;
}
if ( ! stristr($_SERVER['REQUEST_URI'], '/wp-admin') && ! stristr($_SERVER['REQUEST_URI'], '/wp-login.php') && ! is_user_logged_in() )