Skip to content

Instantly share code, notes, and snippets.

View discdiver's full-sized avatar

Jeff Hale discdiver

View GitHub Profile
@decabyte
decabyte / nb_remove_output.py
Last active December 21, 2023 02:32 — forked from damianavila/remove_output.py
Remove output from Jupyter notebook from the command line
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Remove output from existing Jupyter Notebooks.
Modified from remove_output by Minrk, damianavila, gabraganca.
References:
[0]: https://github.com/jupyter/nbformat
[1]: http://nbformat.readthedocs.org/en/latest/index.html
@danprince
danprince / sandbox.js
Last active April 3, 2024 19:35
Sandbox for Code Evaluation
var app = {};
// go through the application and find every single instance of a div
// with the class of 'sandbox'
app.bootstrap = function() {
var sandboxes = document.getElementsByClassName('sandbox');
// for each sandbox, run the createSandbox function
[].forEach.call(sandboxes, app.createSandbox);
};
@dburles
dburles / .eslintrc
Last active March 24, 2017 15:44
Eslint configuration for Meteor projects
{
"env": {
"browser": true,
"meteor": true
},
"ecmaFeatures": {
"arrowFunctions": true,
"blockBindings": true,
"classes": true,
"defaultParams": true,
@mpickering
mpickering / scrub.hs
Created January 19, 2015 23:36
Pandoc filter where headers at levels lower than 3 are not numbered.
module Filter where
import Text.Pandoc.JSON
import Text.Pandoc.Definition
main :: IO ()
main = toJSONFilter scrub
scrub :: Block -> Block
scrub h@(Header level (uid, cs, kvs) title)
@mitchwongho
mitchwongho / Docker
Last active November 29, 2023 06:36
Docker 'run' command to start an interactive BaSH session
# Assuming an Ubuntu Docker image
$ docker run -it <image> /bin/bash
@rxaviers
rxaviers / gist:7360908
Last active May 17, 2024 21:46
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 17, 2024 02:53
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@brantfaircloth
brantfaircloth / cool_argparse_stuff.py
Created December 7, 2011 16:47
Some cool argparse stuff
class FullPaths(argparse.Action):
"""Expand user- and relative-paths"""
def __call__(self, parser, namespace, values, option_string=None):
setattr(namespace, self.dest, os.path.abspath(os.path.expanduser(values)))
def is_dir(dirname):
"""Checks if a path is an actual directory"""
if not os.path.isdir(dirname):
msg = "{0} is not a directory".format(dirname)
raise argparse.ArgumentTypeError(msg)