Skip to content

Instantly share code, notes, and snippets.

(ॢ◕ัڡ ◕ั ॢ)

Cameron Eckelberry cameck

(ॢ◕ัڡ ◕ั ॢ)
View GitHub Profile
cameck / fetchApiCall.js
Created Sep 8, 2019
An API Call helper function for native fetch calls. Abstracts away a lot of common boilerplate in error handling and JSON parsing. Comments are welcome 🤙
View fetchApiCall.js
* Callback for passing back result data.
* @callback updateCallback
* @param {string} result - A success or error string
* Callback to run after all is done.
* @callback finalCallback

Vim Cheat Sheet


  • End of the file: shift + g
  • Next line: j
  • Go down a defined number of lines: number + j
  • Skip to next word: w
  • Skip back a word: b
  • Skip to next section: W
cameck /
Created Jan 15, 2017
Getting AWS Credentials into to a Docker Container without Hardcoding It
AWS_ACCESS_KEY_ID=$(aws --profile default configure get aws_access_key_id)
AWS_SECRET_ACCESS_KEY=$(aws --profile default configure get aws_secret_access_key)
docker build -t my_app .
docker run -it --rm \
View basicHyperConfig.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 19,
// font family with optional fallbacks
View vscode-git-status-tree-hack.js
function injectGitFileStatus()
const timeout = 5000;
const addedColor = "#98C379";
const modifiedColor = "#D19A66";
const stagedColor = "#E06059";
const ignoredOpacity = "0.4";
const explorer = document.getElementById("workbench.view.explorer");
if (explorer)
View recursive_sum_ruby.rb
def sum(arr)
arr.empty? ? 0 : arr.shift + sum(arr)
cameck / themer-dark.terminal
Last active Sep 1, 2017
Dark Terminal Theme for Mac Terminal (Made with Themer)
View themer-dark.terminal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
View config.cson
removeTrailingWhitespace: false
View unzip.rb
# Thanks to
require 'zip/zip'
def unzip_file(file, destination)
files = do |zip_file|
zip_file.each do |f|
zip_file.extract(f, f_path) unless File.exist?(f_path)
View callbackErrorHandlingDynamoDB.js
let count = 1;
dynamoDB.batchWriteItem(params, processItemsCallback);
function processItemsCallback(err, data) {
if (err) {
console.log(JSON.stringify(err, null, 2));
} else {
console.log("Response Data: ", JSON.stringify(data));
let itemsLost = data.UnprocessedItems;
// Check if Object size is greater than 0 so we can process missed items if needed