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
| # /lib/systemd/system/certbot.service | |
| [Unit] | |
| Description=Certbot | |
| Documentation=file:///usr/share/doc/python-certbot-doc/html/index.html | |
| Documentation=https://letsencrypt.readthedocs.io/en/latest/ | |
| [Service] | |
| Type=oneshot | |
| ExecStart=/usr/bin/certbot -q renew --post-hook "kill -9 $(ps -aef | grep "caddy" | grep -v grep | awk '{ print $2 }')" | |
| PrivateTmp=true |
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 | |
| # sync subtitle with https://github.com/smacke/ffsubsync | |
| video_ext = %w(mp4 mkv avi) | |
| subtitle_ext = %w(srt ssa ass) | |
| work_hash = [] | |
| files = Dir[Dir.pwd + '/*'] | |
| video_files = files.select do |file_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
| log: | |
| level: error | |
| file: '' | |
| plugin: | |
| - tag: main_server | |
| type: server | |
| args: | |
| entry: | |
| - _no_ecs |
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
| chrome_string = %x(google-chrome --version) | |
| chrome_string =~ /([\.\d]+)/ | |
| version = $1 | |
| local_chromedriver = %x(chromedriver --version) rescue '' | |
| local_chromedriver =~ /([\.\d]+)/ | |
| local_chromedriver_version = $1 | |
| if version != local_chromedriver_version | |
| url = "https://chromedriver.storage.googleapis.com/#{version}/chromedriver_linux64.zip" |
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
| class MyTestError < StandardError; end | |
| class MyTest | |
| attr_accessor :test | |
| def initialize | |
| @test = {} | |
| end | |
| def self.test(description, &block) |
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 run | |
| EventMachine::run { | |
| Signal.trap("INT") { EventMachine.stop } | |
| Signal.trap("TERM") { EventMachine.stop } | |
| client = Faye::Client.new('http://tangpin.dev:6901/pulling') | |
| store = Store.new | |
| ws = WebSocket.new(client, store) | |
| ws.subscribe |
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
| defmodule WebSocket.Mixfile do | |
| use Mix.Project | |
| def project do | |
| [app: :bigdata_ws, | |
| version: "0.0.1", | |
| elixir: "~> 0.13.1", | |
| deps: deps] | |
| 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
| Visahq.EntriesController = Ember.ArrayController.extend | |
| needs: ['mattersNew'] | |
| content: Ember.computed.alias('controllers.mattersNew.entries') | |
| itemController: 'entry' |
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"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key> | |
| <string>user.shadowsocks</string> | |
| <key>RunAtLoad</key> | |
| <true/> | |
| <key>KeepAlive</key> | |
| <true/> |
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"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key> | |
| <string>user.shadowsocks</string> | |
| <key>RunAtLoad</key> | |
| <true/> | |
| <key>KeepAlive</key> | |
| <true/> |
NewerOlder