Skip to content

Instantly share code, notes, and snippets.

DROP TEMPORARY TABLE IF EXISTS `__ranked_query`;
CREATE TEMPORARY TABLE `__ranked_query` (
`__object_id` BIGINT UNSIGNED,
`__rank` BIGINT UNSIGNED,
KEY `idx_r_o` (`__rank`, `__object_id`),
KEY `idx_o_r` (`__object_id`, `__rank`)
) engine MEMORY
AS
SELECT `__object_id`, `__rank` FROM (
@jankkhvej
jankkhvej / xhyve-freebsd-tutorial-1.md
Created April 21, 2016 22:40 — forked from tanb/xhyve-freebsd-tutorial-1.md
FreeBSD running on xhyve tutorial. (Appendix: Resize image with qemu. Create FreeBSD VM with qemu).

TL;DR

  • Create 5GB FreeBSD image.
  • Install FreeBSD on xhyve.
  • Mount host directory.

Requisites

@jankkhvej
jankkhvej / html5video.sh
Created January 31, 2012 14:56 — forked from markupboy/html5video.sh
automated conversion of a file to all three html5 compatible video formats - h.264, ogg, and webm
#!/bin/sh
####################################
# Output file for HTML5 video #
# Requirements: #
# - handbrakecli #
# - ffmpeg #
# - ffmpeg2theora #
# #
# usage: #
@jankkhvej
jankkhvej / normalized.html
Created January 31, 2012 07:22 — forked from scottkellum/normalized.html
pixel normalization
<!doctype html>
<html>
<head>
<!-- Encoding -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"></meta>
@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 {} \;