Skip to content

Instantly share code, notes, and snippets.

@seyhunak
seyhunak / instructions.md
Last active August 29, 2015 14:09
Rails 4 - Sunspot - Solr - Tomcat

Instructions

Install OpenJDK

sudo apt-get -y install openjdk-7-jdk
sudo mkdir /usr/java
sudo ln -s /usr/lib/jvm/java-7-openjdk-amd64 /usr/java/default

Install Tomcat

@Krishna
Krishna / gist:99829
Created April 22, 2009 14:42
vardump for Lua (modified from Lua Gems)
--
-- vardump
-- original verstion by Tobias Sulzenbruck and Christoph Beckmann
-- source: Lua Gems, page 29
-- modifications: Krishna Kotecha
--
--[[
value - the value to dump
@jastkand
jastkand / ability.rb
Created September 22, 2012 09:42 — forked from watson/ability.rb
Active Admin CanCan integration with shared front/backend User model and multi-level autherization
# app/models/ability.rb
# All front end users are authorized using this class
class Ability
include CanCan::Ability
def initialize(user)
user ||= AdminUser.new
case user.role
when "admin"
@zmaril
zmaril / collatz.clj
Created February 1, 2013 02:26
Collatz fun
(ns collatz.core)
(defn collatz
"Given n, it returns n/2 if it's even or n*3+1 if it's odd."
[n]
(if (even? n)
(/ n 2)
(+ (* 3 n) 1)))
(declare count-steps-of-collatz)
@adnan-i
adnan-i / angular-timeout.html
Last active March 16, 2017 11:55 — forked from orjan/angular-timeout.html
Workaround for $httpProvider.defaults As discussed here http://stackoverflow.com/a/15020611/1095616, it is not possible to set default timeout in $httpProvider. This gist offers a workaround.
<!doctype html>
<html ng-app="myApp">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.5/angular.min.js"></script>
</head>
<body>
<div ng-controller="TodoCtrl">
<button ng-click="beQuickOrBeDead()">Fetch with 100ms timeout</button>
<button ng-click="neverEndingStory()">Fetch with default timeout</button>

##introduction

This benchmark evaluates the different presets options offered by x264, using medium as reference, and providing size and time differences (relative and not).

##benchmark Tests run with latest x264 (12139) and FFmpeg, configured to run with threading enabled. The slower and veryslow presets have been modified to keep the number of refs constant and compatible with most decoders. All results represent an average over 10 runs computed by perf.

Introduction

This table shows the current implementation status of several multimedia fomats by popular tools and browsers. All tests were run with the latest available version, or git HEAD for open source software.

Symbols mean

  • ✅ fully supported
  • ❗ unsupported
  • 💭 work in progress
  • 1️⃣️ see notes
@codification
codification / graphite-client.py
Last active April 29, 2019 17:21
Graphite client in python
import time
import socket
def collect_metric(name, value, timestamp):
sock = socket.socket()
sock.connect( ("localhost", 2003) )
sock.send("%s %d %d\n" % (name, value, timestamp))
sock.close()
def now():
return int(time.time())
https://www.gtplanet.net/how-gran-turismo-is-made/
https://www.fia.com/news/auto-changing-game
https://www.youtube.com/watch?v=I8GQCZgCNw8
https://www.gtplanet.net/dr-kazunori-yamauchi-gives-lecture-gran-turismos-driving-physics-production/
https://www.gtplanet.net/polyphony-digital-reveals-gt-sports-iris-ray-tracing-system-at-cedec-2018
https://www.youtube.com/watch?v=VxL9j-j7JaI
https://www.youtube.com/watch?v=FPX2qRQAnBo
https://www.youtube.com/watch?v=QESGXTFFZXM
https://www.youtube.com/watch?v=-FrybeCxDPU
https://www.youtube.com/watch?v=ygUqvfeAaa0
@alastairmccormack
alastairmccormack / SCTE35 Decoder
Last active December 27, 2019 23:39
SCTE-35 Parser/Decoder in Python
#!/usr/bin/python
'''
SCTE-35 Decoder
The MIT License (MIT)
Copyright (c) 2014 Al McCormack