Skip to content

Instantly share code, notes, and snippets.

View cdmo's full-sized avatar

Charlie Morris cdmo

  • the middle of pennsylvania
  • X @cdmo
View GitHub Profile
@perlun
perlun / .travis.yml
Last active April 14, 2019 07:52
Super-fast Travis JRuby install
# Background: JRuby installs on Travis is painfully slow. The version which is preinstalled is very old. Here are some GitHub
# issues about it:
#
# https://github.com/travis-ci/docs-travis-ci-com/pull/743
# https://github.com/travis-ci/travis-rubies/issues/22
# https://github.com/travis-ci/travis-ci/issues/6892
# https://github.com/travis-ci/packer-templates/issues/391
#
# Since the upstream issue is still unresolved, and a JRuby install takes anywhere from 100 to 200 seconds (!), we decided to
# implement this workaround. With this in place, the JRuby install takes about 10 seconds.

The current kernel/drivers of Fedora 24 do not support the Wifi chip used on my Mac Book Pro. Proprietary Broadcom drivers are packaged and available in the rpmfusion repo.

Verify that your card is a Broadcom using: lspci -vnn -d 14e4:

Sample output:

02:00.0 Network controller [0280]: Broadcom Corporation BCM4360 802.11ac Wireless Network Adapter [14e4:43a0] (rev 03)

Install

Install the rpmfusion repo, note only "nonfree" is required, as the Broadcom Driver is proprietry: http://rpmfusion.org/

@paulirish
paulirish / what-forces-layout.md
Last active April 14, 2024 08:07
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@hectorcorrea
hectorcorrea / .bashrc
Last active May 8, 2023 21:02
My .bashrc
PS1="\w \$ "
alias ls='ls -G -la'
# Git aliases
alias st='git status'
alias br='git branch'
alias co='git checkout'
alias lg='git log'
alias df='git diff'
@rxaviers
rxaviers / gist:7360908
Last active April 16, 2024 06:18
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@chrisjlee
chrisjlee / createdb.sh
Created March 23, 2013 06:28
Create mysql database script
#!/bin/bash
# Help from http://drupal.org/documentation/install/create-database
echo '--------------------------------------------'
echo ' Create a database'
echo '--------------------------------------------'
echo '
'
echo 'Please enter a username to create for this new database:'
@SlexAxton
SlexAxton / .zshrc
Last active April 25, 2023 03:57
My gif workflow
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else
@soffes
soffes / perferences.json
Created August 22, 2012 05:35
My Sublime Text 2 config
{
"bold_folder_labels": true,
"color_scheme": "Packages/User/Espresso Soda.tmTheme",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
".DS_Store",
".gitkeep",
"dump.rdb"
],
@gagarine
gagarine / template.tpl.php
Created July 29, 2012 21:11
Working with drupal theme_menu_tree
<?php
/**
* Theme_menu_tree doesn't provide any context information
* THIS SUCKS
* But you can use hook_block_view_alter to change the theme wrapper
* OUF!
*/
function MYTHEME_menu_tree(&$variables) {
@kostajh
kostajh / db_update.sh
Created February 28, 2012 21:06
Rebuild script for Drupal Install Profile
# This script facilitates obtaining the latest DB data from the production
# Drupal 5 site.
# The script gets an ordered dump of the D5 database, and commits it to the
# git@git.designhammer.net:mysite_d5.git repository master branch.
# We make use of the rebuild.config file, so please make sure that your
# settings are correct there!
# We also assume that your drush aliases are setup correctly for
# @mysite.dev and @mysite_d5.prod. Please check mysite.aliases.drushrc.example,
# make sure your @mysite.dev alias is set up correctly, rename the file
# to mysite.aliases.drushrc.php and move it into your ~/.drush directory.