Skip to content

Instantly share code, notes, and snippets.

@seyhunak
seyhunak / instructions.md
Last active Aug 29, 2015
Rails 4 - Sunspot - Solr - Tomcat
View instructions.md

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 Apr 22, 2009
vardump for Lua (modified from Lua Gems)
View gist:99829
--
-- 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 Sep 22, 2012 — forked from watson/ability.rb
Active Admin CanCan integration with shared front/backend User model and multi-level autherization
View ability.rb
# 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"
View collatz.clj
(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)
View clappr-with-playlist.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>clappr</title>
<script src="http://cdn.clappr.io/latest/clappr.min.js"></script>
</head>
<body>
<div id="player"></div>
<script>
@adnan-i
adnan-i / angular-timeout.html
Last active Mar 16, 2017 — 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.
View angular-timeout.html
<!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>
View x264_preset_benchmark_2015.md

##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.

View multimedia_state_of_the_art.md

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 Apr 29, 2019
Graphite client in python
View graphite-client.py
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())
View car_simulator_physics.txt
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