Skip to content

Instantly share code, notes, and snippets.

View DanielZhangQingLong's full-sized avatar
🎯
Focusing

Daniel DanielZhangQingLong

🎯
Focusing
View GitHub Profile
@eheydrick
eheydrick / rename-chef-org.txt
Last active August 13, 2018 04:50
Rename a chef org
It's not officially supported but you can rename an org on Chef Server 12+
# connect to the DB
sudo -u opscode-pgsql /opt/opscode/embedded/bin/psql -U "opscode-pgsql" -d opscode_chef
# get the id of the org you want to change
select * from orgs;
# update the org name
update orgs set name='NEW_ORG_NAME' where id='ORG_ID';
@anotheruiguy
anotheruiguy / web-fonts-asset-pipeline.md
Last active June 24, 2024 22:11
Custom Web Fonts and the Rails Asset Pipeline

Web fonts are pretty much all the rage. Using a CDN for font libraries, like TypeKit or Google Fonts, will be a great solution for many projects. For others, this is not an option. Especially when you are creating a custom icon library for your project.

Rails and the asset pipeline are great tools, but Rails has yet to get caught up in the custom web font craze.

As with all things Rails, there is more then one way to skin this cat. There is the recommended way, and then there are the other ways.

The recommended way

Here I will show how to update your Rails project so that you can use the asset pipeline appropriately and resource your files using the common Rails convention.