Skip to content

Instantly share code, notes, and snippets.

View thejohnnybot's full-sized avatar

Johnny Mejias thejohnnybot

  • North Bergen, NJ
View GitHub Profile

default: Ember

import Ember from 'ember';

default: Ember.Application

import Application from 'ember-application';
@devinus
devinus / rmcc.md
Last active March 24, 2020 21:08
Rebelmail Code Challenge

Rebelmail Code Challenge

Minimize an HTML page with inline CSS using whatever novel techniques you can think of without affecting the presentation of the document.

Write a microservice to consume the HTML, save an email document to a database with the original and transformed versions of the document, and send the transformed result in an HTML email to a specified recipient.

@l1x
l1x / partition.sql
Last active April 23, 2024 11:36
Creating PostgreSQL table partitions automatically based on the date field (type date as well) -- each day is a single partition
CREATE TABLE testing_partition(patent_id BIGINT, date DATE) WITH ( OIDS=FALSE);
CREATE OR REPLACE FUNCTION create_partition_and_insert() RETURNS trigger AS
$BODY$
DECLARE
partition_date TEXT;
partition TEXT;
BEGIN
partition_date := to_char(NEW.date,'YYYY_MM_DD');
partition := TG_TABLE_NAME || '_' || partition_date;
@chrissimpkins
chrissimpkins / gist:5bf5686bae86b8129bee
Last active December 21, 2025 20:02
Atom Editor Cheat Sheet: macOS

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key
@JeffBelback
JeffBelback / docker-destroy-all.sh
Last active June 12, 2025 15:08
Destroy all Docker Containers and Images
#!/bin/bash
# Stop all containers
containers=`docker ps -a -q`
if [ -n "$containers" ] ; then
docker stop $containers
fi
# Delete all containers
containers=`docker ps -a -q`
if [ -n "$containers" ]; then
docker rm -f -v $containers
@john2x
john2x / 00_destructuring.md
Last active November 21, 2025 02:39
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences

@ngpestelos
ngpestelos / remove-docker-containers.md
Last active October 8, 2025 18:58
How to remove unused Docker containers and images

May 8, 2018

I wrote this four years ago, so instead use this command:

$ docker rmi $(docker images -q -f dangling=true)
@clemtibs
clemtibs / dkcleanup.sh
Last active November 13, 2023 10:49
Bash script helper to remove Docker images and containers.
#!/bin/bash
# options:
# remove stopped containers and untagged images
# $ dkcleanup
# remove all stopped|running containers and untagged images
# $ dkcleanup --reset
# remove containers|images|tags matching {repository|image|repository\image|tag|image:tag}
# pattern and untagged images
# $ dkcleanup --purge {image}
@willurd
willurd / web-servers.md
Last active December 28, 2025 13:59
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000