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" | |
| ) | |
| func main() { | |
| arr := []int{10, 7, 3, 4, 6, 7, 0, 9} | |
| arr = sort(arr) |
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" | |
| "sync" | |
| "time" | |
| ) | |
| func main() { | |
| fmt.Println(time.Now()) |
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
| # https://github.com/AdguardTeam/AdGuardHome/blob/fd629be/Dockerfile.linux64 | |
| FROM alpine:latest | |
| # AdGuard version | |
| ARG ADGUARD_VERSION="0.92" | |
| ENV ADGUARD_VERSION $ADGUARD_VERSION | |
| # AdGuard architecture and package info | |
| ARG ADGUARD_ARCH="linux_amd64" | |
| ENV ADGUARD_ARCH ${ADGUARD_ARCH} |
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
| /* | |
| * Be sure not to close local server at `applicationDidEnterBackground:`. | |
| * This causes file not found error in Safari. | |
| */ | |
| class LocalHTTPConnection: HTTPConnection { | |
| override func httpResponseForMethod(method: String!, URI path: String!) -> NSObject! { | |
| if path == LocalWebViewRouter.Profile.URL.path { | |
| return LocalProfileReponse(filePath: self.filePathForURI(path), forConnection: self) |
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 'csv' | |
| input = ARGV[0] || 'exported_contacts.CSV' | |
| output = "#{Time.now.strftime('%Y%m%d-%H%M%S')}.vcf" | |
| groups = { | |
| 'グループなし' => 0, | |
| } | |
| File.open(output, 'w:cp932') do |file| |
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
| # FYI: | |
| # http://www.j7lg.com/archives/1732 | |
| require 'xcodeproj' | |
| def bail_if_nil(obj, msg) | |
| return unless obj.nil? | |
| puts msg | |
| exit | |
| end |
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
| minitest ~> 4.7.3 | |
| $ ci-test $(find -L $PWD/test -name \*_test.rb) | |
| Starting test-queue master (/tmp/test_queue_16649_70329599330480.sock) | |
| ==> Summary (8 workers in 2.5028s) | |
| [ 8] 0 tests, 0 assertions, 0 failures, 0 errors, 0 skips 0 suites in 0.0055s (pid 16702 exit 0) | |
| [ 1] 6 tests, 16 assertions, 0 failures, 0 errors, 0 skips 2 suites in 1.0579s (pid 16695 exit 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
| require 'active_record' | |
| DATABASE_NUM = ENV['CI_DATABASE_NUM'] || 2 | |
| namespace :ci do | |
| task :test_environment => :environment do | |
| ENV['RAILS_ENV'] = Rails.env = ActiveRecord::Tasks::DatabaseTasks.env = 'test' | |
| end | |
| namespace :db do |
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 'date-utils' | |
| module.exports = (robot) -> | |
| robot.respond /([^\s]*)\s?の\s?([^\s]*)\s?の運勢/i, (msg) -> | |
| dateArgs = msg.match[1] | |
| signArgs = msg.match[2] | |
| date = switch dateArgs | |
| when '昨日' | |
| Date.yesterday() |
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 'net/http' | |
| require 'json' | |
| GITLAB_URL = 'http://source.yourhost.com' | |
| GITLAB_TOKEN = '>>>>' | |
| BITBUCKET_OWNER = '>>>>' | |
| BITBUCKET_PASSWORD = '>>>>' | |
NewerOlder