Skip to content

Instantly share code, notes, and snippets.

View roycehaynes's full-sized avatar

Royce Haynes roycehaynes

View GitHub Profile
@roycehaynes
roycehaynes / iterm2.md
Created November 20, 2018 20:34 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)

Keybase proof

I hereby claim:

  • I am roycehaynes on github.
  • I am roycehaynes (https://keybase.io/roycehaynes) on keybase.
  • I have a public key ASBUo58WjFC0dUjpon1xHbWVsrPO0f2Hg6rTqlmcGRWy9go

To claim this, I am signing this object:

To sort processes by memory usage:

ps aux --sort -rss

ps aux --sort -rss | head -10

To view files in a directory with tons of files (making ls slow):

ls -ltr * | tail

{
"name": "the-app",
"version": "0.1.0",
"description": "description",
"main": "gulpfile.js",
"author": "Royce Haynes",
"dependencies": {
"es6-promise": "^1.0.0",
"validator": "~3.17.1",
var AppConstants = require('../constants/AppConstants.js');
var AppDispatcher = require('../dispatchers/AppDispatcher.js');
var api = require('../utils/api');
var ActionTypes = AppConstants.ActionTypes;
module.exports = {
create_customer: function(data){
api.customer.create(data);
}
{
"color_scheme": "Packages/Color Scheme - Default/Solarized (Dark).tmTheme",
"font_size": 16,
"hot_exit": false,
"remember_open_files": false,
"translate_tabs_to_spaces": true
}
FROM ubuntu:12.04
RUN mkdir -p /home/vagrant/www
#RewriteEngine On
# This will enable the Rewrite capabilities
#RewriteCond %{HTTPS} !=on
# This checks to make sure the connection is not already HTTPS
#RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
# This rule will redirect users from their original location, to the same location but using HTTPS.
# i.e. http://www.example.com/foo/ to https://www.example.com/foo/
# The leading slash is made optional so that this will work either in httpd.conf
@roycehaynes
roycehaynes / snowshow_pricing.html
Created May 15, 2013 17:41
Here's an example...
<html>
<head>
<title></title>
<script type="text/javascript">
function calculatePrice(){
var form = document.forms['computePrice'];
var numOfUnits = form.elements['numOfUnits'].value;
var leadTime = form.elements['leadTime'].value;
@roycehaynes
roycehaynes / Server.php
Created February 26, 2013 20:34
Magento 623 error code issue
/**
* Handle an xmlrpc call (actual work)
*
* @param Zend_XmlRpc_Request $request
* @return Zend_XmlRpc_Response
* @throws Zend_XmlRpcServer_Exception|Exception
* Zend_XmlRpcServer_Exceptions are thrown for internal errors; otherwise,
* any other exception may be thrown by the callback
*/
protected function _handle(Zend_XmlRpc_Request $request)