Skip to content

Instantly share code, notes, and snippets.

@jwage
jwage / SplClassLoader.php
Last active April 9, 2024 21:04
Add MIT license.
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
@karmi
karmi / ElasticSearch.org.Website.Search.FieldNotes.markdown
Created April 8, 2011 17:15
Field notes gathered during installing and configuring ElasticSearch for http://elasticsearch.org

ElasticSearch.org Website Search: Field Notes

These are field notes gathered during installation of website search facility for the ElasticSearch website.

You may re-use it to put a similar system in place.

The following assumes:

@jankkhvej
jankkhvej / shellcommand.sh
Created August 1, 2011 06:52 — forked from anonymous/shellcommand.sh
script to parse PHP short open tags and convert ones to normal
find project/dir/ -type f -iname "*.php" -exec php -d short_open_tag=On the_script.php {} \;

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@xavhan
xavhan / Shazam to youtube and spotify.js
Last active January 9, 2018 08:58
Shazam Crawler and Youtube Searcher in the console
var data = [];
$(".ti__details").each(function(i){
var artist = $(this).find(".ti__artist meta").attr("content");
var title = $(this).find(".ti__title").attr("content");
var format = artist + " - " + title;
var yt = 'http://www.youtube.com/results?search_type=&search_query=' + encodeURI(artist + " " + title) + '&aq=f&oq=';
var spoti = 'https://play.spotify.com/search/'+ encodeURI(artist + " " + title);
var item = new Object;
console.groupCollapsed(format);
console.log(yt);