Skip to content

Instantly share code, notes, and snippets.

@pathikrit
pathikrit / README.md
Last active April 24, 2021 17:36
My highly opinionated list of things needed to build an app in Scala
@alirobe
alirobe / reclaimWindows10.ps1
Last active July 3, 2024 09:36
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
package filters
import play.api.mvc._
import controllers.Default
import play.api.libs.iteratee.Enumerator
import play.Logger
object CorsFilter extends Filter {
@dgageot
dgageot / SEOFilter.java
Created February 15, 2013 14:27
Jersey Filter *Prototype* that uses PhantomJS to retrieve pages asked by Googlebot. This way the javascript is interpreted by phantomjs and it provides a static webpage to Google.
package main;
import com.google.common.base.Strings;
import com.google.common.io.ByteStreams;
import com.sun.jersey.spi.container.ContainerRequest;
import com.sun.jersey.spi.container.ContainerResponse;
import com.sun.jersey.spi.container.ContainerResponseFilter;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
@k33g
k33g / iteratees_humains.md
Created September 15, 2012 18:25 — forked from loicdescotte/iteratees_humains.md
Play2 : Les Iteratees expliqués aux humains... francophones!

#Play2 : Les Iteratees expliqués aux humains... francophones!

Disclamer : Ce qui suit est la traduction d'un article anglophone paru sur le blog mandubian.com

Vous pouvez retrouver l'article original ici

Vous avez probablement remarqué une nouvelle fonctionnalité intrigante de Play2 nommée Iteratee (ainsi queb ses compagnons Enumerators et Enumeratee). Le but de cet article est d'essayer de rendre le concept d'Iteratee compréhensible pour le plus grand nombre avec des arguments simples, en évitant l'approche mathématique / fonctionnelle.

Cet article ne prétend pas tout expliquer à propos des Iteratee / Enumerator / Enumeratee mais traite plutôt les idées qui se cachent derrière.

@eoinmcg
eoinmcg / min.py
Created August 23, 2012 12:14
Handy utility for @js13kGames, zip your files and keep track of file size
#!/usr/bin/python
# Simple python script that takes a html file extracts all scripts and concatenates them into
# a single file. The concatenated script is then sent to the google closure compiler for further
# squishing.
# Finally a game.zip archive is created with all specified files. The size of this archive
# is printed to standard output
#
# Usage:
# In the terminal type:
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@mxcl
mxcl / uninstall_homebrew.sh
Created August 26, 2011 11:25
Uninstall Homebrew
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e