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
| daemon off; | |
| # Heroku dynos have at least 4 cores. | |
| worker_processes <%= ENV['NGINX_WORKERS'] || 4 %>; | |
| events { | |
| use epoll; | |
| accept_mutex on; | |
| worker_connections 1024; | |
| } |
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
| esphome: | |
| name: airrohr | |
| platform: ESP8266 | |
| board: nodemcuv2 | |
| # Enable logging | |
| logger: | |
| level: WARN | |
| # Enable Home Assistant API |
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 file = fs.createReadStream(path); | |
| var sha1_for_file = crypto.createHash('sha1'); | |
| file.addListener('error', function(err) { | |
| throw err; | |
| }); | |
| file.addListener('data', function(data) { | |
| sha1_for_file.update(data); | |
| }); | |
| file.addListener('close', function() { |
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
| sensor: | |
| - platform: rest | |
| name: luftdaten | |
| resource: http://192.168.1.149/data.json | |
| scan_interval: 100 | |
| json_attributes: | |
| - sensordatavalues | |
| value_template: '{{ value_json.age }}' | |
| - platform: template | |
| sensors: |
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 "bundler" | |
| Bundler.setup | |
| require 'json' | |
| require 'excon' | |
| # get token | |
| login_response = Excon.post('https://api.prod.eed.ista.com/login', | |
| body: '{"email":"email", "password":"password","fromMobileApp":true}', | |
| headers: { "Content-Type" => "application/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
| #!/bin/sh | |
| # PROVIDE: cortex | |
| # REQUIRE: DAEMON | |
| # KEYWORD: shutdown | |
| # | |
| # Add the following lines to /etc/rc.conf to enable cortex: | |
| # | |
| # cortex_enable (bool): Set to "NO" by default. |
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 Postgres 9.2 from https://launchpad.net/~pitti/+archive/postgresql | |
| # drop the cluster which gets created during the setup | |
| pg_dropcluster --stop 9.2 main | |
| # create a backup of your current cluster | |
| rsync -a /var/lib/postgresql/9.1 /var/lib/postgresql/9.1.backup | |
| # upgrade the the old 9.1 cluster | |
| pg_upgradecluster 9.1 main /var/lib/postgresql/9.2 |
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
| DO LANGUAGE plpgsql $$ | |
| DECLARE counter INTEGER = 1; | |
| DECLARE tick INTEGER = 1; | |
| BEGIN | |
| WHILE counter > 0 LOOP | |
| UPDATE table | |
| SET field = NULL | |
| WHERE id IN ( | |
| SELECT id | |
| FROM table |
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
| mkdir /tmp/zroot | |
| zpool import -fR /tmp/zroot zroot | |
| mkdir /tmp/root | |
| mount -t zfs zroot/ROOT/default /tmp/root |
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
| #!/home/rof/.rvm/rubies/ruby-2.2.0/bin/ruby | |
| require 'json' | |
| require 'net/http' | |
| class CodeshipRestartBuild | |
| def self.restart_build | |
| self.new.restart_build | |
| end |
NewerOlder