This file contains 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
base64string = '...' | |
output = LogDecoder.new(base64string) | |
p output | |
[ | |
{timestamp_epoch: 1529805565, timestamp_datetime: "Sun, 24 Jun 2018 01:59:25 +0000", event: "BATTERY_VOLTAGE_PERCENT_REMAINING", data: nil}, | |
{timestamp_epoch: 1529808426, timestamp_datetime: "Sun, 24 Jun 2018 02:47:06 +0000", event: "EVENT_BLE_DISCONNECTED", data:nil}, | |
{timestamp_epoch: 1529808427, timestamp_datetime: "Sun, 24 Jun 2018 02:47:07 +0000", event: "BATTERY_PERCENT_REMAINING", data: "0"}, | |
{timestamp_epoch: 1529808430, timestamp_datetime: "Sun, 24 Jun 2018 02:47:10 +0000", event: "EVENT", data: "29 > than 29"} |
This file contains 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
AxUWNRY1FjUWNRY1FjUWNRY1FjUWNRY1FjUWFRZVFhZ1NRYVFjUWNhU1FhY1FjU2FTYVFhUWFRYVFhU2FRUW0wa7A6AUwBi7EKAowCwYGbsQoDzAPrsQoEjASrsQoFLAVLsQoFjAXJtBoF6bQaBkwGaWXxU2FbsCoGrAbLsQoHD1CxYWdZsUoHjAersQoH7AgAGbwwGghAHAhgGbxQKgigH1JBY2VcCOAdsboJYBwJYBlin1AdsmoJwBwJwB9TcWFpUCFRb1HBY2FRbVAcCiAfspoKIBm0GgqAHAqAG7UaCuAcCuAZtBoLQBwLQB2yCgxgHAyAG1TxY2FRb7AaC8AcC6ATU2FRUWFhUWNTUWlQEWNRY1FhUWNRY1FjUWFRY1FjUWNRYVFrsMoLIBwLIB9QoWNRYVFrUEFrsRoMYBwMgBtQIW9WoW9b8EFrUSFrUEFrUEFtUCFpULFpULFjUWFRY1FjUWFRY1FjUWNRYVFjUWNRY1FhUWNRY1FhbAwgH75Q6gwAHAvAG7nAagugHAtgH7vAagtAHAsAGbigWgrgHAqgH7vAagqAHApAHb6wWgogHAngHb5wOgnAHAmAG73QaglgHAkgG71wOgkAHAjAGbywWgigE= |
This file contains 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
(function ($, window) { | |
$.fn.contextMenu = function (settings) { | |
return this.each(function () { | |
// Open context menu | |
$this = $(this) | |
$this.on("contextmenu", function (e) { | |
//open menu |
This file contains 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 String | |
def to_pseudo_number | |
return if self.nil? | |
self.split(//).inject([]) {|num, x| num << x.ord}.join().to_i | |
end | |
end | |
class Array | |
def sort_letters |
This file contains 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
// | |
// Responsive: Utility classes | |
// -------------------------------------------------- | |
// IE10 Metro responsive | |
// Required for Windows 8 Metro split-screen snapping with IE10 | |
// | |
// Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/ | |
@-ms-viewport{ |
This file contains 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
location ~* ^/(assets|images|javascripts|system)/ { | |
# Per RFC2616 - 1 year maximum expiry | |
# http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html | |
expires 1y; | |
add_header Cache-Control public; | |
# Some browsers still send conditional-GET requests if there's a | |
# Last-Modified header or an ETag header even if they haven't | |
# reached the expiry date sent in the Expires header. | |
# Do NOT unset Last-Modified! |
This file contains 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
%h1 Sorry, Givey.org doesn't support Internet Explore 6. | |
%p | |
Honestly, we can't even begin to express how old your browser is. It's not even worth viewing web pages with that browser. | |
%p | |
Upgrading browsers is free and super easy. We strongly recommend Google Chrome, but you can do the latest Internet Explorer if you like. | |
%p | |
Here are some links. Come back to Givey when you upgrade (and you'll thank us:) |
This file contains 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
example: application named 'beefbox' | |
create a sytem user called 'beefbox' | |
bdsm nginx server beefbox | |
su - beefbox | |
bdsm bdsmrc | |
<edit ~/.bdsmrc settings> | |
-> make sure the enviornment is what you want it to be and set the repo url | |
<do ssh key dance> | |
bdsm rails setup --repo git://github.com/beefbox/... | |
bdsm unicorn setup |
This file contains 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
This script creates a variety of different montage like backgrounds for Mac using random pictures from your machine. I personally place this in in the root of either the Originals folder in iPhoto or in the Photobooth folder and let it go nuts. | |
You need the following for this to work: | |
1 - Ruby 1.8.7 or higher | |
2 - ImageMagick installed (use Macports) | |
3 - These files: http://cl.ly/240a2a264b0b155a3764 | |
To get it to work, place create_wallpaper.rb and montage.png in the ROOT of whatever folder has your images. It will recurse subdirectories. |