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 | |
| require 'open-uri' | |
| require 'json' | |
| PKR_URL = 'http://www.oref.org.il/WarningMessages/alerts.json' | |
| AREA_FMT = 'מרחב: %s, קוד מרחב: %s' | |
| LOG_FMT = '[%s] id: %s, %s' | |
| def to_json |
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 led = 13; | |
| int in = 0; | |
| void setup() { | |
| pinMode(led, OUTPUT); | |
| Serial.begin(9600); | |
| } | |
| void loop() { | |
| if (Serial.available() == 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
| #!/usr/bin/env ruby | |
| require 'fileutils' | |
| SOURCE = '/tmp/mbox/' | |
| DESTINATION = '/tmp/maildir/domain.com/' | |
| def is_maildir(path) | |
| dirs = Dir[File.join(path, '*')] | |
| dirs.select {|name| File.directory?(File.join(path, name)) && |
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
| source "https://rubygems.org" | |
| gem 'grape' | |
| gem 'rack' |
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
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "path/filepath" | |
| ) | |
| // | |
| const ( |
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
| /* install postgresql-contrib */ | |
| CREATE EXTENSION "uuid-ossp"; | |
| select uuid_generate_v4(); |
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
| package main | |
| import ( | |
| "fmt" | |
| "github.com/alexcesaro/mail/gomail" | |
| "net/smtp" | |
| ) | |
| type Email struct { | |
| From string |
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
| package main | |
| import ( | |
| "fmt" | |
| "gopkg.in/redis.v2" | |
| "time" | |
| ) | |
| const ( | |
| Subscription int = iota |
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
| package main | |
| import ( | |
| "fmt" | |
| ini "github.com/vaughan0/go-ini" | |
| "os" | |
| ) | |
| const File = "test.ini" |
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
| module Kernel | |
| def suppress_warnings | |
| original_verbosity = $VERBOSE | |
| $VERBOSE = nil | |
| result = yield | |
| $VERBOSE = original_verbosity | |
| return result | |
| end | |
| end |