This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var commands = []; | |
var serie = 1; | |
var serietitle = prompt("Serie Title"); | |
$('table tbody tr').each(function(k) | |
{ | |
var title = $(this).find('td').eq(2).text(); | |
if (!title) return; | |
var episode = k<10 ? "0"+k : k; | |
var finder = "*"+serie+"x"+episode+"*"; | |
commands.push( "mv \"$(find . -name "+finder+")\" \""+serietitle+" - "+serie+"x"+episode+" - "+title+".avi\"" ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.extend({ | |
cssanimate : function(css_values, anim_time, anim_method, callback) | |
{ | |
var $this = $(this); | |
if (!Modernizr.csstransitions) | |
{ | |
$this.animate(css_values, anim_time, anim_method, callback); | |
return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class GranFather | |
{ | |
function a() | |
{ | |
return 'GranFather.A'; | |
} | |
function b() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
(function(){ | |
if (!window.PhotoPermalink) throw "Photo not found on the page."; | |
var photoInf = PhotoPermalink.getInstance().getCurrentPhotoInfo(); | |
if (!photoInf) throw "Photo not found on the page."; | |
var jsonList = prompt("Enter your JSON Friends List:\nYou can generate it on: http://kopiro.it/apps/jsonfs", ""); | |
JSONFriends = JSON.parse(jsonList); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
usort($elements, function($a, $b) | |
{ | |
$pattern = "#tag1|tag2|tag3|tag4#i"; | |
preg_match_all($pattern, $a, $_a); | |
preg_match_all($pattern, $b, $_b); | |
return (count($_a[0])<count($_b[0])); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <OpenGL/gl.h> | |
#include <OpenGL/glu.h> | |
#include <GLUT/glut.h> | |
#include <iostream> | |
#include <cmath> | |
using namespace std; | |
float base_up = 2*sqrt(3); | |
float base_down = 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cmath> | |
#include <GL/glut.h> | |
#include <GL/glu.h> | |
#include <GL/gl.h> | |
void renderScene() // this function is called when you need to redraw the scene | |
{ | |
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); // clear the scene |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// g++ src.cpp -lglut -lGL -lGLU; ./a.out | |
#include <iostream> | |
#include <cmath> | |
#include <GL/glut.h> | |
#include <GL/glu.h> | |
#include <GL/gl.h> | |
// CAMERA position | |
GLfloat CAMERA_X = 0; | |
GLfloat CAMERA_Y = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* The function */ | |
function ∫($o) | |
{ | |
$class_regex = "[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*"; | |
$code = preg_replace("#{$class_regex}::__set_state#", 'return', var_export($o,1)); | |
return eval($code.';'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo mkdir -p /System/Library/Frameworks/GL.framework/Headers/; | |
sudo ln -s /System/Library/Frameworks/OpenGL.framework/Headers/gl.h /System/Library/Frameworks/GL.framework/Headers/gl.h; | |
sudo ln -s /System/Library/Frameworks/OpenGL.framework/Headers/glu.h /System/Library/Frameworks/GL.framework/Headers/glu.h; | |
sudo ln -s /System/Library/Frameworks/GLUT.framework/Headers/glut.h /System/Library/Frameworks/GL.framework/Headers/glut.h; |