Skip to content

Instantly share code, notes, and snippets.

View ctsstc's full-sized avatar
🔥
me = new Person(new Year(2019+7));

Cody Swartz ctsstc

🔥
me = new Person(new Year(2019+7));
View GitHub Profile
@lmarkus
lmarkus / README.MD
Last active June 30, 2026 16:02
Extracting / Exporting custom emoji from Slack

Extracting Emoji From Slack!

Slack doesn't provide an easy way to extract custom emoji from a team. (Especially teams with thousands of custom emoji) This Gist walks you through a relatively simple approach to get your emoji out.

If you're an admin of your own team, you can get the list of emoji directly using this API: https://api.slack.com/methods/emoji.list. Once you have it, skip to Step 3

HOWEVER! This gist is intended for people who don't have admin access, nor access tokens for using that list.

Follow along...

anonymous
anonymous / bonfire-return-largest-numbers-in-arrays.js
Created December 9, 2015 04:27
http://www.freecodecamp.com/fcc3b5ed711 's solution for Bonfire: Return Largest Numbers in Arrays
// Bonfire: Return Largest Numbers in Arrays
// Author: @fcc3b5ed711
// Challenge: http://www.freecodecamp.com/challenges/bonfire-return-largest-numbers-in-arrays
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function largestOfFour(arr) {
return arr.map(function(obj){
return obj.reduce( function(a, b) {
if (a > b)
return a;
anonymous
anonymous / bonfire-find-the-longest-word-in-a-string.js
Created December 9, 2015 04:12
http://www.freecodecamp.com/fcc3b5ed711 's solution for Bonfire: Find the Longest Word in a String
// Bonfire: Find the Longest Word in a String
// Author: @fcc3b5ed711
// Challenge: http://www.freecodecamp.com/challenges/bonfire-find-the-longest-word-in-a-string
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function findLongestWord(str) {
var words = str.split(' ');
str = words[0];
words.forEach(function(e, i) {
@loic-moriame
loic-moriame / index.js
Created July 24, 2015 09:23
node.js + sequelize + sqlite
'use strict';
var Sequelize = require('sequelize');
var sequelize = new Sequelize('mainDB', null, null, {
dialect: "sqlite",
storage: './test.sqlite',
});
sequelize

Writing template strings in Markdown

With template strings coming to ES6, the backtick (`) means something in Markdown and in JavaScript. If you write this:

To display a message, write `alert(`hello world!`)`.

it'll render like this:

To display a message, write alert(hello world!).

@staringispolite
staringispolite / asciiputsonglasses
Last active April 30, 2026 21:26
Ascii art sunglasses meme
Puts on glasses:
(•_•)
( •_•)>⌐■-■
(⌐■_■)
Takes off glasses ("mother of god..."):
(⌐■_■)
( •_•)>⌐■-■
@JemiloII
JemiloII / gist:1cf15e3acd29eb2192a4
Created June 19, 2014 23:31
Showing objects to Cody
var objectName = {}; // This is just declaring a object if you nothing to put in it.
// some frameworks do stuff like this
objectName = {
name: "Brian",
dosomething: function(res){
console.log('something');
}
}
@kenn
kenn / gist:51af188d35dac8069313
Last active August 29, 2015 14:01
DigitalOcean Disk Performance (May 2014)

Degradation of DigitalOcean Disk Performance

DigitalOcean's disk performance got order of magnitude worse. Compare the following test result with the ones that I did last year, when they started to support Virtio:

Probably DO started to throttle the I/O on the cheaper droplets, but the result is poor overall.

@lfender6445
lfender6445 / gist:9919357
Last active September 14, 2026 08:18
Pry Cheat Sheet

Pry Cheat Sheet

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

@mutewinter
mutewinter / commit_format_examples.txt
Created March 19, 2014 18:52
Examples of my commit format.
chore: add Oyster build script
docs: explain hat wobble
feat: add beta sequence
fix: remove broken confirmation message
refactor: share logic between 4d3d3d3 and flarhgunnstow
style: convert tabs to spaces
test: ensure Tayne retains clothing