Skip to content

Instantly share code, notes, and snippets.


Saurabh tkshnwesper

Block or report user

Report or block tkshnwesper

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:96162bb24c242682dc77f29c16f67dd8
# Host Database
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
## localhost broadcasthost
::1 localhost
sam-artuso /
Last active Feb 3, 2020
Setting up Babel and nodemon

Setting up Babel and nodemon

Inital set-up

Set up project:

mkdir project
cd project
npm init -y
fperez / ProgrammaticNotebook.ipynb
Last active Feb 10, 2020
Creating an IPython Notebook programatically
View ProgrammaticNotebook.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
motylwg / primesStreamExample.scala
Created Jun 26, 2013
Sieve of Eratosthenes using Scala streams.
View primesStreamExample.scala
def sieve(s: Stream[Int]): Stream[Int] =
s.head #:: sieve(s.tail filter(_ % s.head != 0))
val primes = sieve(Stream.from(2))
tylerneylon / learn.lua
Last active Feb 24, 2020
Learn Lua quickly with this short yet comprehensive and friendly script. It's written as both an introduction and a quick reference. It's also a valid Lua script so you can verify that the code does what it says, and learn more by modifying and running this script in your Lua interpreter.
View learn.lua
-- Two dashes start a one-line comment.
Adding two ['s and ]'s makes it a
multi-line comment.
-- 1. Variables and flow control.
jshaw / byobuCommands
Last active Feb 24, 2020
Byobu Commands
View byobuCommands
Byobu Commands
byobu Screen manager
Level 0 Commands (Quick Start)
<F2> Create a new window
richard-flosi /
Created Sep 26, 2012
Bottle with Cross-origin resource sharing (CORS)
Example of setting up CORS with
from bottle import Bottle, request, response, run
app = Bottle()
def enable_cors():
RaVbaker /
Created Mar 30, 2012
[HOWTO] Rewrite all urls to one index.php in Apache

Redirect All Requests To Index.php Using .htaccess

In one of my pet projects, I redirect all requests to index.php, which then decides what to do with it:

Simple Example

This snippet in your .htaccess will ensure that all requests for files and folders that does not exists will be redirected to index.php:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
You can’t perform that action at this time.