Skip to content

Instantly share code, notes, and snippets.

(ॢ◕ัڡ ◕ั ॢ)

Cameron Eckelberry cameck

(ॢ◕ัڡ ◕ั ॢ)
View GitHub Profile
View vscode-git-status-tree-hack.js
function injectGitFileStatus()
const timeout = 5000;
const addedColor = "#8dc149";
const modifiedColor = "#cbcb41";
const stagedColor = "#ca2820";
const ignoredOpacity = "0.4";
const explorer = document.getElementById("workbench.view.explorer");
if (explorer)
cjkoepke / logging_errors.js
Created Aug 10, 2017
Debugging tips and tricks.
View logging_errors.js
// Great for getting values, outputting context strings, and so on.
// Same as console.log(), but prints in yellow as a warning. Useful to show a non-breaking error in a dev env.
console.warn('It is a good idea to use .map instead of a for-loop.')
// Same as console.log(), but prints in red as an error. Useful to show a breaking error in a dev env.
console.error(`The value must be an integer. You provided a ${typeof variable}.`)
// Group console data together for better viewing. Nice to group console logs together.
thejohnfreeman /
Last active Apr 19, 2021
Semantic UI fonts with Webpack in a Chrome extension

To get Semantic UI fonts working:

  1. npm install semantic-ui-css

  2. Import 'semantic-ui-css/semantic.css' in your entry script. The exact syntax for this varies depending on your chosen module format: import for ES6, require for CommonJS, etc. This tells Webpack to pull the CSS into your bundle.

  3. npm install --save-dev style-loader css-loader

andywirv / gist:f312d561c9702522f6d4ede1fe2750bd
Created Nov 22, 2016
Update Lambda function configuration, specifically the environment variables. AWS Cli version aws-cli/1.11.20
View gist:f312d561c9702522f6d4ede1fe2750bd
#quotes on json, single around entire object and double on each property
aws lambda update-function-configuration --function-name=[lambda function name] --environment '{"Variables":{"abc":"124"}}'
eddroid /
Last active Apr 6, 2016
Ruby Refactorings

Never Boolean

You hardly ever have to use the word true in your code.

if (something == true)
  # do something cool

Can be rewritten as

stinoga / console.js
Created Dec 27, 2014
Save console output to a file
View console.js
(function(console){ = function(data, filename){
if(!data) {
console.error(' No data')
if(!filename) filename = 'console.json'