Skip to content

Instantly share code, notes, and snippets.

View chai2's full-sized avatar

Chaitanya Malla chai2

  • San Francisco, CA
View GitHub Profile
@jstvz
jstvz / sfdx_maps.vim
Last active June 21, 2022 21:15
*DEPRECATED*: Salesforce DX aliases and shell completions for working with sfdx in zsh and vim
" SFDX mappings
" Requires https://github.com/skywind3000/asyncrun.vim
let mapleader = "\<Space>"
nmap <leader>fst :AsyncRun sfdx force:source:status<CR>
nmap <leader>fsp :AsyncRun sfdx force:source:push<CR>
nmap <leader>wfsp :w<CR> :AsyncRun sfdx force:source:push<CR>
nmap <leader>fsl :AsyncRun sfdx force:source:pull<CR>
nmap <leader>fol :AsyncRun sfdx force:org:list<CR>
1. `vim /etc/syslog.conf`
2. Add to end of file: `cron.* /var/log/cron.log`
3.
```
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.syslogd.plist
sudo launchctl load /System/Library/LaunchDaemons/com.apple.syslogd.plist
```
[where-is-the-cron-log-file-in-macosx-lion](http://apple.stackexchange.com/questions/38861/where-is-the-cron-log-file-in-macosx-lion)
@henrik
henrik / config--initializers--rails4_to_rails3_downgradability.rb
Created June 18, 2015 09:55
Fix "NoMethodError: undefined method `sweep'" error when downgrading from Rails 4 to Rails 3.
# Without this fix, downgrading from Rails 4 to Rails 3 causes session cookies to blow up.
#
# The way the flash is stored in the session changed in a backwards-incompatible way.
if Rails::VERSION::MAJOR == 3
module ActionDispatch
class Flash
def call(env)
if (session = env['rack.session']) && (flash = session['flash'])
@ChuckJHardy
ChuckJHardy / digital_ocean_setup.md
Last active October 27, 2023 17:51
DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3 Setup Instructions

DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3

SSH into Root

$ ssh root@123.123.123.123

Change Root Password

@wh1tney
wh1tney / deploy-static-site-heroku.md
Last active April 23, 2024 17:49
How to deploy a static website to Heroku

Gist

This is a quick tutorial explaining how to get a static website hosted on Heroku.

Why do this?

Heroku hosts apps on the internet, not static websites. To get it to run your static portfolio, personal blog, etc., you need to trick Heroku into thinking your website is a PHP app. This 6-step tutorial will teach you how.

Basic Assumptions