Skip to content

Instantly share code, notes, and snippets.

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active July 17, 2024 14:20
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:

@michaelparenteau
michaelparenteau / config.ru
Last active January 29, 2016 05:55
Basic Auth Middleman & Heroku
# This is a snippet to add to middleman's config.ru file if you want to add basic auth to your middleman app on heroku
# NOTE: you need to stick this above the build script like shown below
use Rack::Auth::Basic, "Restricted Area" do |username, password|
[username, password] == ['username', 'password']
end
# This part below is just what builds the static site. you only need to add lines 4 - 6 above any build command like shown below.
use Rack::TryStatic, :root => "build", :urls => %w[/], :try => ['.html', 'index.html', '/index.html']
@SamMolokanov
SamMolokanov / Readme.md
Last active January 26, 2024 23:57
Custom sprockets compressor as proxy skips minified assets

Proposal

Many modern Rails application use third-party assets like JavaScript and CSS libraries or frameworks. In most cases these assets are minified and compressed by tools outside of the Rails asset pipeline. For example popular gem React on Rails uses WebPack to build JavaScript bundles. When we include these files to assets pipeline it goes to minify again. We can safely avoid double minification and reduce assets compilation time. Meanwhile it is still good to add a digest and gzip compression.

Example

Savings are strongly depend on how many minified assets are used in an application, some numbers for a random application:

# standard setup
@eyecatchup
eyecatchup / watchRobot.cron.php
Last active October 14, 2017 21:29
Mr. Robot Season 2 easter egg website email alert cronjob
<?php
ini_set('max_execution_time', 300);
/**
* Mr. Robot Season 2 easter egg website email alert cronjob (Note: Requires PHP /w curl and being able to send mails!)
*
* 1. Download this script. Via browser (https://gist.github.com/eyecatchup/f5f5929f57b22fc1b37ef516d675ac92/download/) or:
* wget --no-check-certificate https://gist.github.com/eyecatchup/f5f5929f57b22fc1b37ef516d675ac92/raw/watchRobot.cron.php
* 2. Set the value for the constant NOTIFY_MAIL_ADDRESS (line #17) to your email address.
* 3. Create a new cronjob (for a Win/Xampp alternative see: http://stackoverflow.com/a/4231634/624466). On your console, type:
* crontab -e
@bsletten
bsletten / ml-recs.md
Last active June 21, 2024 21:22
Machine Learning Path Recommendations

This is an incomplete, ever-changing curated list of content to assist people into the worlds of Data Science and Machine Learning. If you have a recommendation for something to add, please let me know. If something isn't here, it doesn't mean I don't recommend it, I just may not have had a chance to review it yet or not.

I will generally list things in order of easier to more formal/challenging content.

It may feel like there is an overwhelming amount of stuff for you to learn (because there is). But, there is a guided path that will get you there in time. You need to focus on Linear Algebra, Calculus, Statistics and probably Python (or R). Your best bet is to get a Safari Books Online account (https://www.safaribooksonline.com) which you may already have access to through school or work. If not, it is a reasonable way to get access to a tremendous number of books and videos.

I'm not saying you will get what you need out of everything here, but I have read/watched at least some of all of the following an