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
// Draw the curve using a bezier curve tool like: https://www.desmos.com/calculator/d1ofwre0fr | |
// Get p0, p1, p2 and p3 from that tool | |
using UnityEngine; | |
using System; | |
public class BezierCalculator | |
{ | |
Vector3 p0; | |
Vector3 p1; |
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 Trello highlight lists on IT Board | |
// @description Highlight certain columns in Trello. | |
// @include https://trello.com/b/CdaXFAGQ/it-work-in-progress | |
// @require https://code.jquery.com/jquery-3.4.1.min.js | |
// @version 0.1 | |
// @copyright 2014, Gareth J M Saunders | |
// @copyright 2019, Dalia Research GmbH | |
// ==/UserScript== |
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 Trello highlight lists on IT Board | |
// @description Highlight certain columns in Trello. | |
// @include https://trello.com/b/CdaXFAGQ/it-work-in-progress | |
// @require https://code.jquery.com/jquery-3.4.1.min.js | |
// @version 0.1 | |
// @copyright 2014, Gareth J M Saunders | |
// @copyright 2019, Dalia Research GmbH | |
// ==/UserScript== |
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
module MyWrapperCreator | |
def my_method_wrapper(method_name) | |
original_method = instance_method(method_name) | |
define_method(method_name) do |*args, &block| | |
puts "wrapper :: INI" | |
result = original_method.bind(self).call(*args, &block) | |
puts "wrapper :: END" | |
result |
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
drop procedure if exists clone_table; | |
delimiter $$ | |
create procedure clone_table () | |
begin | |
declare n int; | |
set n := 0; | |
while n < 20 do | |
insert destiny_table select | |
field_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
watch -t -n 30 "(date '+%Y-%m-%d %H:%M:%S,' | tr -d '\n'; curl -o /dev/null -s -w %{time_total} http://myweb.com; echo) | tee -a /tmp/my_web.log" |
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
# Simple but necessary script (for Mac) to announce when the beer time is comming | |
# You can configure your crontab like this | |
# 0 17 * * 5 ruby $HOME/scripts/beer_time.rb >> /var/log/beer_time.log 2>&1 | |
beer_hour = ARGV[0] || 18 | |
def say(message) | |
`afplay /System/Library/Sounds/Hero.aiff` | |
`afplay /System/Library/Sounds/Hero.aiff` | |
`say "#{message}"` |
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
require "csv" | |
module Script | |
def self.run(input_path, output_path) | |
log = File.read(input_path) | |
lines_count = log.lines.count | |
index = 0 | |
File.open(output_path, "w") do |output_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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
}); |
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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
robotName: '', | |
robots: Ember.ArrayProxy.create({ content: Ember.A([ | |
{ name: "Mazinger Z" }, | |
{ name: "Lady Electric" } | |
])}), | |
actions: { |