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
def speak_hour(hour) | |
hour = 0 if hour == 24 | |
{ | |
0 => "midnight", | |
1 => "one", | |
2 => "two", | |
3 => "three", | |
4 => "four", | |
6 => "six", |
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 'json' | |
require 'open-uri' | |
require 'open3' | |
STREAMS_URL = 'https://mixlr-codetest.herokuapp.com/stations/netil-radio/streams' | |
def fetch_streams(url = STREAMS_URL) | |
body = URI.open(url).read | |
json = JSON.parse(body) | |
json.dig('data', 'attributes', 'streams') |
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 'json' | |
require 'open-uri' | |
require 'open3' | |
STREAMS_URL = 'https://mixlr-codetest.herokuapp.com/stations/netil-radio/streams' | |
body = URI.open(STREAMS_URL).read | |
json = JSON.parse(body) | |
volumes = json.dig('data', 'attributes', 'streams').map do |stream_name, url| |
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
0x56baCa0397AD8ff17F59EA5b19ea6708E7A550fb |
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 ping -q -c 5 -W 1 192.168.1.1 > /dev/null; then | |
echo "IPv4 is up" | |
else | |
echo "IPv4 is down" | |
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
var SHEET_ID = "17lRx0wgx9f2JutGKKFfkHmbrkqgsy7nf6IDJL07w-Vs"; | |
var SHEET_NAME = "downloads"; | |
function doGet(event) { | |
return handleResponse(event); | |
} | |
function doPost(event) { | |
return handleResponse(event); | |
} |
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
docker run -d --name='mediabox-webdav' -v '/mnt/user/appdata/mediabox-webdav':'/config':'rw' -v '/mnt/disks/mediabox-webdav':'/mnt/mediaefs':'rw,shared' --device='/dev/fuse' --cap-add SYS_ADMIN 'mumiehub/rclone-mount' | |
docker exec -it mediabox-webdav sh | |
rclone config --config /config/.rclone.conf | |
# trzeba zdefiniować zasób o nazwie "mediaefs" |
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
<html> | |
<body> | |
<form onsubmit="event.preventDefault(); createToken()"> | |
number: <input id="card-number" value="4111111111111111"><br> | |
name: <input id="card-name" value="John Doe"><br> | |
due date: <input id="card-due-date" value="1/2020"><br> | |
cvv: <input id="card-cvv" value="123"><br> | |
<input type="submit" value="create token"> | |
</form> |
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
length = 66.5; | |
width = 18.75; | |
height = 13; | |
thickness = 1; | |
module spring(radius, width, height, thickness, $fn = 12) { | |
for (sx = [1, -1]) { | |
scale([sx, 1, 1]) { | |
cube([(width / 2 - radius) / 2 + thickness, thickness, height + thickness]); | |
translate([width / 2 - radius + thickness, 0, 0]) { |
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
rows = 10; | |
cols = 10; | |
height = 5; | |
frame_thickness = 2; | |
cell_radius = 9.5; | |
wire_radius = 1.5; | |
module frame() { | |
difference() { | |
hull() { |
NewerOlder