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 | |
apt-get -y install gcc gtk-doc-tools libexo-1-dev libgarcon-1-0-dev libglib-2.0-dev libvte-dev libwnck-dev libxfce4ui-1-dev libxfce4util-dev xfce4-dev-tools xserver-xorg-dev |
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 elements = document.querySelectorAll('*'); | |
Array.prototype.slice.call(elements).forEach(function (element) { | |
var rgba = [Math.floor(Math.random()*256), Math.floor(Math.random()*256), Math.floor(Math.random()*256), 0.1]; | |
element.style.background = 'none'; | |
element.style.backgroundColor = 'rgba(' + rgba.join(',') + ')'; | |
}); |
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
generatePassword = (length) -> | |
# similar looking characters have been removed (e.g. letter l(L) and number 1) | |
allowedChars = "acdefghjkmnpqrstuvwxyzCDEFGHJKLMNPQRTUVWXY3679-+?@" | |
password = "" | |
for [1..length] | |
password += allowedChars[Math.floor(Math.random() * allowedChars.length)] | |
password |
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
// Define global Test object. You can leave this out in production. | |
Test = Test || {}; | |
(function($) { | |
var someHelperFunction = function(s, d) { | |
return s*d; | |
} | |
var someOtherHelperFunction = function(s) { | |
return s*2; |
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 Photo < ActiveRecord::Base | |
has_attached_file :image, | |
:styles => { | |
:thumb => '100x100', | |
:large => '640x480', | |
}, | |
:storage => :s3, | |
:s3_credentials => "#{::Rails.root.to_s}/config/s3.yml", | |
:path => ':attachment/:id/:style.:extension', | |
:bucket => 'my-bucket', |
NewerOlder