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
function r (e) { | |
if (typeof(e.window) == "undefined") { | |
return "ok you're done"; | |
} | |
return r(e.window); | |
} | |
r(this); // RangeError: Maximum call stack size exceeded |
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 MathHelper = { | |
// Get a value between two values | |
clamp: function (value, min, max) { | |
if (value < min) { | |
return min; | |
} | |
else if (value > max) { | |
return max; | |
} |
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/sh | |
DRIVER=/lib64/xorg/modules/drivers/fglrx_drv.so | |
for x in $(objdump -d $DRIVER|awk '/call/&&/EnableLogo/{print "\\x"$2"\\x"$3"\\x"$4"\\x"$5"\\x"$6}'); do | |
sed -i "s/$x/\x90\x90\x90\x90\x90/g" $DRIVER | |
done |
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
public class TestYnQuadTree | |
{ | |
private List<YnSprite> sprites; | |
private YnSprite heroSprite; | |
private YnQuadTree quadTree; | |
public TestGame() | |
{ | |
// Init some Sprites | |
sprites = new List<YnSprite>(); |
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
// Gets the iframe created by colorbox | |
var iframe = $("#colorbox").find("iframe"); | |
// Gets focus on iframe | |
iframe.focus(); | |
// Allow fullscreen on iframe | |
iframe.attr({ | |
webkitAllowFullScreen : true, | |
mozAllowfullscreen : true, |
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 | |
ifconfig wlan0 | |
iwconfig wlan0 essid YOUR_NETWORK_NAME key YOUR_KEY | |
dhclient wlan0 |
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
/** | |
* Toggle fullscreen function who work with webkit and firefox. | |
* @function toggleFullscreen | |
* @param {Object} event | |
*/ | |
function toggleFullscreen(event) { | |
var element = document.body; | |
if (event instanceof HTMLElement) { | |
element = event; |
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
/** | |
* Determine if a variable is define or not. | |
* | |
* @method isDefine | |
* @param {Object} a variable to test. | |
* @return {Boolean} Return true if the parameter is defined, otherwise return false. | |
*/ | |
function isDefine (value) { | |
return value != void(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
import 'dart:html'; | |
// A base class for a person | |
class Person { | |
String name; | |
String toString() => "Hi ! " + this.name; | |
Person(String name) { | |
this.name = name; | |
} |
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 "SDL.h" | |
#include "Game.h" | |
#include "Graphics/SpriteBatch.h" | |
#include "Vector2.h" | |
using namespace Atlantis::Framework; | |
class Game1 : public Game | |
{ | |
private: |