Command Line
pry -r ./config/app_init_file.rb- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb- load your rails into a pry session
Debugger
Command Line
pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb - load your rails into a pry sessionDebugger
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| _ | |
| _ooOoo_ | |
| o8888888o | |
| 88" . "88 | |
| (| -_- |) | |
| O\ = /O | |
| ____/`---'\____ | |
| .' \\| |// `. | |
| / \\||| : |||// \ | |
| / _||||| -:- |||||_ \ |
-moz-appearance to none. This will "reset" the styling of the element;text-indent to 0.01px. This will "push" the text a tiny bit[1] to the right;I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.
If you want to roll up all of these into a single jQuery plugin check out Sharrre
Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.
| #!/bin/bash | |
| target_branch="production" | |
| working_tree="PATH_TO_DEPLOY" | |
| while read oldrev newrev refname | |
| do | |
| branch=$(git rev-parse --symbolic --abbrev-ref $refname) | |
| if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then | |
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| #First released as C++ program by Hiroyuki Tsutsumi as part of the free software suite “Beer” | |
| #I thought porting it to Python could be both a challenge and useful | |
| from sys import argv, exit, getsizeof | |
| from struct import pack_into, unpack_from | |
| def ceil4(n): |
OS X 10.11, aka El Capitan, comes with a new system font for Chinese users, named PingFang, it includes 6 weights for both Simplified and Traditional Chinese. The same font also appear on iOS 9 as the default UI font, though Apple didn't mention it explicitly.
If you are in Apple Developer Program (costs 99 USD a year), then you can get them now at their developer resource site, otherwise you can wait for their public beta to come out in July or wait for the public release this fall (a free upgrade like previous release).
Or you can get PingFang.ttc from your developer friends, though you are probably violating its font license one way or another, but I am not a lawyer so freedom to you.
At Crush + Lovely, we use Railsmachine's Moonshine to automate the configuration of our servers. When writing our deployment recipes, VMWare Fusion's ability to take snapshots and rollback to these snapshots is a huge timesaver because it takes just seconds to roll a server image to it's original state.
When you're just configuring a single server, having a static IP address for your server image isn't too important, but when you're configuring multi-server setups, it can be useful to duplicate a number of server images and give each a static IP address so you can consistently deploy to them. While not documented well at all, it turns out that this is relatively easy to accomplish in four simple steps.
Let's say you have a guest machine with the name ubuntu-lucid-lynx-base
| // global vars | |
| var winWidth = $(window).width(); | |
| var winHeight = $(window).height(); | |
| // set initial div height / width | |
| $('div').css({ | |
| 'width': winWidth, | |
| 'height': winHeight, | |
| }); |