Skip to content

Instantly share code, notes, and snippets.

View LeahArmstrong's full-sized avatar

Leah Armstrong LeahArmstrong

View GitHub Profile
@MarkBennett
MarkBennett / installing-ruby-2.5.1-on-m1.md
Last active February 5, 2025 13:03
Installing Ruby 2.5 on Mac M1
@fernandoaleman
fernandoaleman / fix-libv8-mac.txt
Created May 5, 2016 15:14
Fixing libv8 and therubyracer on Mac
brew tap homebrew/versions
brew install v8-315
gem install libv8 -v '3.16.14.13' -- --with-system-v8
gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315
bundle install
@stefanotorresi
stefanotorresi / ansible-playbook.yml
Created April 7, 2016 11:46
Wordpress theme deployment and development with Ansible, Composer and wp-cli
---
- hosts: wordpress-server
vars:
root_directory: /var/www/html
theme_name: your-theme-name
theme_repo: https://yourtheme.git.url.git
locale: it_IT
url: http://absolute-url.tld
title: Worpdress
admin_user: admin
@brunnolou
brunnolou / svg-transform-origin-absolute.js
Created August 31, 2015 13:31
Calculate SVG absolute `transform-origin` position to be compatible with firefox
var element = document.querySelector(prompt('Insert the querySelector to the svg element.', '#gear'));
var bbox = element.getBBox(),
x = bbox.x,
y = bbox.y,
w = bbox.width,
h = bbox.height
;
var result =
'center center' + "\n" +
@arjunvenkat
arjunvenkat / gist:1115bc41bf395a162084
Last active January 12, 2024 05:04
Seeding a Rails database with a CSV file

How to seed a Rails database with a CSV file

1. Setup

First, Create a folder inside of lib called seeds

Put your CSV file example.csv into the lib/seeds folder. In the example below, the file is called real_estate_transactions.csv

Make sure you've created a resource with the appropriate columns to match your seed data. The names don't have to match up.

anonymous
anonymous / An-Anonymous-Pen.markdown
Created October 11, 2013 18:31
A Pen by A Non Ymous.
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 16, 2025 22:55
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname