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
#!/usr/bin/ruby | |
@exec="red5.sh" | |
@name="Red 5" | |
@match="/var/red5/boot.jar" | |
@kill_sig="-9" | |
@sleep=5 | |
@pidfile=File.expand_path(File.join(File.dirname(__FILE__), "pid", "#{@exec}.pid")) | |
@path=File.expand_path(File.join(File.dirname(__FILE__))) |
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
# Allows you to define "allow_single_access" in multiple ways : | |
# | |
# single_access_allowed #all methods are accessable | |
# single_access_allowed :only=>:index | |
# single_access_allowed :only=>[:index, :show] | |
# single_access_allowed :except=>[:edit] | |
# single_access_allowed :except=>[:edit, :delete] | |
# | |
### example |
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
//Add this after your cookie control script | |
function TranslateCookieControl(){ | |
var cookieControlTitle="Cookie Acceptatie"; | |
var cookieControlOkButton="Ik ga hiermee akkoord !"; | |
var cookieControlMoreInfoButton="Meer info" | |
var cookieControlLessInfoButton="Minder info" | |
$('p.ccc-about').remove(); | |
$('#ccc-go').html(cookieControlOkButton); | |
$('.ccc-inner').children().first().html(cookieControlTitle); |
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
NAME=`git --no-pager show -s --format='%cn' $REVISION|sed -e 's/ .*//'` && curl -X POST --data "{\"content\": \"Deploy by @$NAME is done #deploy\", \"external_user_name\": \"Semaphore\", \"tags\": [\"deploy\"]}" https://api.flowdock.com/v1/messages/<API_KEY> --header "Content-Type:application/json" |
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
### Keybase proof | |
I hereby claim: | |
* I am smeevil on github. | |
* I am smeevil (https://keybase.io/smeevil) on keybase. | |
* I have a public key whose fingerprint is 7873 DAFA 55BF 1BA5 C258 229D 1FD5 EFA3 4596 87B5 | |
To claim this, I am signing this object: |
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
Template.chatLine.helpers | |
username: -> | |
username = userIdsToUserNames[@userId] | |
return username if username | |
console.log "searching for id #{@userId}" | |
user = Meteor.users.findOne(_id: @userId) | |
if user? | |
userIdsToUserNames[@userId] = user.username | |
return user.username | |
else |
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
Template.foo.rendered = -> | |
@_mySharedFunction = -> | |
console.log "yeah baby" | |
Template.foo.events | |
'click .something': (e, template)-> | |
template._mySharedFunction() | |
Template.foo.helpers | |
myHelper: -> |
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
// ==UserScript== | |
// @name Minimal Irc Cloud | |
// @namespace http://govannon.nl/ | |
// @version 0.1 | |
// @description Add a button to toggle minimal mode for irc cloud | |
// @author Smeevil | |
// @match https://www.irccloud.com | |
// @grant none | |
// ==/UserScript== | |
setTimeout(function() { |
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
str="You shall not not pass" | |
if str == "Somehow it does" || "But why is that?" | |
console.log "I passed with no problems ??" | |
str="You shall not not pass" | |
if str == ("I cannot pass anymore" || "Me either") | |
console.log "This indeed never happens" |
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 static float GetAngleOfTransformToSelf(Transform other, Transform origin, bool debug) { | |
var angle = (Math.Atan2(other.position.z - origin.position.z, other.position.x - origin.position.x)*Mathf.Rad2Deg); | |
angle += origin.rotation.eulerAngles.y; | |
angle -= 90; | |
while (angle > 180) angle -= 360; | |
if (!debug) return (float) angle; | |
Debug.Log(string.Format("angle orgin {0} to {1} : {2}", origin, other, angle), origin); | |
Debug.DrawLine(origin.position, other.position, Color.white, 1.0f); | |
return (float)angle; |
OlderNewer