Skip to content

Instantly share code, notes, and snippets.

View levibrown's full-sized avatar
:octocat:

Levi Brown levibrown

:octocat:
  • Bend, Oregon
  • 14:22 (UTC -07:00)
View GitHub Profile
@levibrown
levibrown / rbenv-install-system-wide.sh
Created January 7, 2012 20:24
rbenv install and system wide install on Ubuntu 10.04 LTS.
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Add rbenv to the path:
@levibrown
levibrown / CSS3 Media Queries Template
Created January 26, 2012 19:09
CSS3 Media Queries template
/*
* Author: http://stuffandnonsense.co.uk/blog/about/hardboiled_css3_media_queries/
*/
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
require "bundler/capistrano"
$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
require "rvm/capistrano"
set :rvm_ruby_string, '1.9.2@sinatroxy'
set :rvm_type, :system
set :bundle_flags, "--deployment"
set :application, "sinatroxy"
set :repository, "xxx@yyy:sinatroxy"
au FileType qf call AdjustWindowHeight(3, 10)
function! AdjustWindowHeight(minheight, maxheight)
let l = 1
let n_lines = 0
let w_width = winwidth(0)
while l <= line('$')
" number to float for division
let l_len = strlen(getline(l)) + 0.0
let line_width = l_len/w_width
let n_lines += float2nr(ceil(line_width))
@levibrown
levibrown / nginx.conf
Created January 19, 2017 19:21 — forked from cpswan/nginx.conf
Using nginx to proxy to an AWS ELB
daemon off;
worker_processes 1;
events { worker_connections 1024; }
http{
sendfile on;
// gif by dave aka @beesandbombs :)
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
@levibrown
levibrown / doc-table.md
Created May 24, 2022 18:53 — forked from antfu/doc-table.md
Doc Table in Markdown

Example

Name

Description


@levibrown
levibrown / shadow-dom.md
Created September 14, 2022 18:21 — forked from praveenpuglia/shadow-dom.md
Everything you need to know about Shadow DOM

I am moving this gist to a github repo so more people can contribute to it. Also, it makes it easier for me to version control.

Please go to - https://github.com/praveenpuglia/shadow-dom-in-depth for latest version of this document. Also, if you find the document useful, please shower your love, go ⭐️ it. :)

Shadow DOM

Heads Up! It's all about the V1 Spec.

In a nutshell, Shadow DOM enables local scoping for HTML & CSS.