Skip to content

Instantly share code, notes, and snippets.

{
"npc_dota_hero_antimage": {
"abilities": {
"1": {
"cooldown": "21.0 18.0 15.0 12.0",
"damage": null,
"damage_type": "",
"description": null,
"mana_cost": "60 60 60 60",
"name": null,
@muZk
muZk / $socket.js
Last active August 29, 2015 16:53
app.service("$socket", ['$timeout',function($timeout) {
var host = window.location.hostname;
var protocol = window.location.protocol;
var socket = io.connect(protocol + '//' + host);
this.on = function(event, callback) {
socket.on(event, function(data){
$timeout(function(){
callback.call(socket, data);
library TriggeredAura
struct TriggeredAura
private static thistype array stack
private static integer count = 0
private static timer t = CreateTimer()
private static thistype active
private integer index
library DamageExtension requires Damage
// percent from 0 to 100
function Damage_BlockPercent takes real percent returns nothing
call Damage_Block( GetEventDamage() * percent/100)
endfunction
endlibrary
var app = angular.module("Projects", ["ngRoute"]);
app.config(function($routeProvider, $locationProvider) {
$locationProvider.html5Mode(true);
$routeProvider
.when("/projects", { templateUrl: "<%= asset_path('projects/index.html') %> ", controller: "ProjectsIndexCtrl" })
.when("/projects/:id", { templateUrl: "<%= asset_path('projects/show.html') %> ", controller: "ProjectsShowCtrl" })
.otherwise({ redirectTo: "/projects" });
});
@muZk
muZk / gist:09e9f26f4aabdfd95690
Last active August 29, 2015 14:07
Be Awesome
var sad = (function(){
var areYouSad = true;
Boolean.prototype.stop = function(){
areYouSad = false;
}
return function(){
return areYouSad;
module SpreadsheetReader
=begin
class Base
def self.attr_accessor(*vars)
@attributes ||= []
@attributes.concat vars
super(*vars)
end
require 'csv'
CSV.foreach 'data/ratings.csv' do |row|
puts row
end