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
scss: | |
rect { | |
stroke-width: 0px; | |
&.dado { | |
fill: green; | |
&.side { | |
fill: blue; | |
} | |
&.two { |
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
// Includes one file | |
//= require name/path[.ext] | |
// Includes files in one directory, but not nested | |
//= require_directory path | |
// Includes all nested files | |
//= require_tree path | |
// Adds the requested asset to the list of assets to be compiled |
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
class Thread | |
class << self | |
alias_method :old_new, :new | |
def new(*args, &block) | |
new_thread = old_new(*args, &block) | |
new_thread.thread_variable_set(:parent, Thread.current) | |
return new_thread | |
end | |
end | |
end |
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
/* | |
* Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | |
* | |
* Use of this source code is governed by a BSD-style license | |
* that can be found in the LICENSE file in the root of the source | |
* tree. | |
*/ | |
// Original used from: https://github.com/webrtc/samples/blob/750b0ec7675b3326831bb95261b33d0842bc2b39/src/content/datachannel/basic/js/main.js |
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 'rubygems' | |
require 'pry' | |
VALID_COINS = [1, 5, 10, 25, 50] | |
def change(amount) | |
change_iter(amount, VALID_COINS).each do |item| | |
puts item.inspect | |
end | |
end |
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
CREATE TRIGGER populate_management_relation_closures | |
AFTER INSERT ON management_relations | |
FOR EACH ROW | |
BEGIN | |
INSERT INTO management_relation_closures(manager_id, reportee_id, depth) | |
-- Insert the actual manager relation | |
SELECT NEW.manager_id, NEW.reportee_id, 1 | |
-- Make sure all of the manager's managers know of the new reportee | |
UNION | |
SELECT manager_id, NEW.reportee_id, depth + 1 FROM management_relation_closures |
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 | |
# Note: This is a joke. If you actually run this script, then I will laugh, and you will deserve whatever happens. | |
user=`whoami` | |
# Must be run as root | |
if [ $user != 'root' ]; then | |
echo "This script must be run as root. Aborting." | |
exit 1; | |
fi |
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
// VirtualWire.cpp | |
// | |
// Virtual Wire implementation for Arduino | |
// See the README file in this directory fdor documentation | |
// | |
// Changes: | |
// 2008-05-25: fixed a bug that could prevent messages with certain | |
// bytes sequences being received (false message start detected) | |
// | |
// Author: Mike McCauley ([email protected]) |
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
tracker = {} | |
Keywords.all.each do |keyword| | |
tracker[keyword.user_id] ||= {} | |
name = keyword.name.strip | |
if tracker[keyword.user_id][name] | |
# Is Extra | |
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
import java.security.Key; | |
import java.security.PrivateKey; | |
import java.security.PublicKey; | |
import java.security.SecureRandom; | |
import java.security.KeyPair; | |
import java.security.Security; | |
import java.security.Signature; | |
import javax.crypto.Cipher; | |
import javax.crypto.KeyGenerator; |