Forked from this, but added slider.
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
:aws_signature.sign_v4_query_params( | |
s3_config.access_key_id, | |
s3_config.secret_access_key, | |
s3_config.region, | |
"s3", | |
:erlang.universaltime(), | |
"GET", | |
"https://#{s3_config.bucket}.s3.#{s3_config.region}.amazonaws.com/#{asset.key}", | |
body_digest: "UNSIGNED-PAYLOAD" | |
) |
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 svg = document.getElementsByTagName("svg")[0]; | |
var bbox = svg.getBBox(); | |
[bbox.x, bbox.y, bbox.width, bbox.height].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
# add the -t option for tracks | |
gpsbabel -t -i kml -f Telluride.kml -o garmin -F usb: | |
# To get Caltopo tracks to show up in Backcountry Navigator App, convert the KML using gpsbabel | |
gpsbabel -i kml -f from_cal_topo.kml -o gpx -F to_app.gpx |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<CORSConfiguration xmlns="http://s3.amazon.com/doc/2006-03-01/"> | |
<CORSRule> | |
<AllowedOrigin>https://tracker-dvd.ufcfit-one.com</AllowedOrigin> | |
<AllowedMethod>GET</AllowedMethod> | |
<AllowedMethod>POST</AllowedMethod> | |
<AllowedMethod>PUT</AllowedMethod> | |
<MaxAgeSeconds>3000</MaxAgeSeconds> | |
<AllowedHeader>*</AllowedHeader> | |
</CORSRule> |
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
int MOTOR_A_BRAKE = 9; | |
int MOTOR_A_SPEED = 3; | |
int MOTOR_A_DIR = 12; | |
int MOTOR_B_BRAKE = 8; | |
int MOTOR_B_SPEED = 11; | |
int MOTOR_B_DIR = 13; | |
void setup() { | |
pinMode(MOTOR_A_SPEED, OUTPUT); |
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
#!/usr/bin/env ruby | |
# Remove all gems EXCEPT defaults :) | |
`gem list -d`.split(/\n\n^(?=\w)/).each do |data| | |
match = data.match(/(?<name>([^\s]+)) \((?<versions>.*)\)/) | |
name = match[:name] | |
versions = match[:versions].split(', ') | |
if match = data.match(/^.*\(([\d\.]*),? ?default\): .*$/) | |
next if match[1].empty? # it's the only version if this match is empty |
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
convert -delay 200 -loop 0 -crop 200x200+0+0 +repage *.png animated.gif |
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 | |
### BEGIN INIT INFO | |
# Provides: iptables | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Firewall | |
### END INIT INFO |
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
if Rails.env.development? | |
class XipIoMiddleware | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
%w{HTTP_HOST SERVER_NAME SERVER_ADDR HTTP_X_FORWARDED_HOST}.each do |key| | |
env[key] = env[key].sub(/myapp\.\d+\.\d+\.\d+\.\d+\.xip\.io/, "myapp.dev") if env[key].present? | |
end |
NewerOlder