Skip to content

Instantly share code, notes, and snippets.

View travisbell's full-sized avatar
🚀
ZOOM ZOOM

Travis Bell travisbell

🚀
ZOOM ZOOM
View GitHub Profile
@nickyp
nickyp / self_signed_cert.rb
Last active September 4, 2023 23:46
create a self-signed certificate using ruby-openssl
We couldn’t find that file to show.
@aaronshaf
aaronshaf / es.sh
Created September 3, 2011 03:53
Install ElasticSearch on Ubuntu 11.04
cd ~
sudo apt-get update
sudo apt-get install unzip curl python-software-properties -y
#sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.18.7.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
@courtenay
courtenay / autosuggest.html
Created April 18, 2012 22:29
Tender: Sample jsonp autosuggest implementation.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Test JSONP search api</title>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
</head>
@jayj
jayj / flexbox.less
Last active June 23, 2024 01:14
CSS3 Flexbox - LESS Mixins
// --------------------------------------------------
// Flexbox LESS mixins
// The spec: http://www.w3.org/TR/css3-flexbox
// --------------------------------------------------
// Flexbox display
// flex or inline-flex
.flex-display(@display: flex) {
display: ~"-webkit-@{display}";
display: ~"-ms-@{display}box"; // IE10 uses -ms-flexbox
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active June 5, 2024 22:16
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:

@ogrrd
ogrrd / dnsmasq OS X.md
Last active July 3, 2024 08:40
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install

@BlakeGardner
BlakeGardner / compact.js
Last active February 19, 2024 16:55
Compact all collections inside of a MongoDB database
// This script loops though the list of collection names in a MongoDB and runs the compact operation on them
// Simply paste this into the Mongo shell
use testDbName;
db.getCollectionNames().forEach(function (collectionName) {
print('Compacting: ' + collectionName);
db.runCommand({ compact: collectionName });
});
@travisbell
travisbell / Cool TMDb Queries.txt
Last active August 29, 2015 14:07
Some examples of some really cool discover queries on TMDb!
Q: What movies are in theatres?
URL: /discover/movie?primary_release_date.gte=2014-09-15&primary_release_date.lte=2014-10-22
Q: What are the most popular movies?
URL: /discover/movie?sort_by=popularity.desc
Q: What are the highest rated movies rated R?
URL: /discover/movie/?certification_country=US&certification=R&sort_by=vote_average.desc
Q: What are the most popular kids movies?
@toritori0318
toritori0318 / nginx_for_production.conf
Last active December 29, 2021 19:04
nginx balancer example
worker_processes 1;
daemon off;
error_log /dev/stdout;
events {
worker_connections 1024;
}
http {