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/bash | |
| TARGET="mysite.example.net"; | |
| RECIPIENT="hostmaster@mysite.example.net"; | |
| DAYS=7; | |
| echo "checking if $TARGET expires in less than $DAYS days"; | |
| expirationdate=$(date -d "$(: | openssl s_client -connect $TARGET:443 -servername $TARGET 2>/dev/null \ | |
| | openssl x509 -text \ | |
| | grep 'Not After' \ | |
| |awk '{print $4,$5,$7}')" '+%s'); | |
| in7days=$(($(date +%s) + (86400*$DAYS))); |
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("RBLuaTest", package.seeall) | |
| local version = "1.7" | |
| local luadir = "/etc/cmh-ludl/" | |
| --[[ | |
| LuaTest is a tool for testing Vera scene Lua code. It runs on Vera as an http handler. | |
| Upload RBLuaTest.lua to Vera using APPS->Develop Apps->Luup files then restart Vera. | |
| Enter following three lines into APPS->Develop Apps->Test Luup code (LUA) and click GO: |
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 php | |
| <?php | |
| /** | |
| * .git/hooks/pre-commit | |
| * | |
| * This pre-commit hooks will check for PHP errors (lint), and make sure the | |
| * code is PSR-2 compliant. | |
| * | |
| * Dependecy: PHP-CS-Fixer (https://github.com/fabpot/PHP-CS-Fixer) | |
| */ |
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/bash | |
| # | |
| # Script for installing x11vnc on Steam Deck. | |
| # | |
| # Install: | |
| # | |
| # sh -c "$(curl -fsSL https://gist.githubusercontent.com/cgmartin/26fc89f4887e4817e51a298eec937061/raw/vnc_install.sh?$RANDOM)" | |
| # | |
| # This will modify root filesystem so it will probably get | |
| # overwrite on system updates but is totally ok executing |
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/bash | |
| # Usage: | |
| # $ le-aws-upload-cert.sh | |
| echo "Current list of certificates in AWS" | |
| echo "-----------------------------------" | |
| aws iam list-server-certificates | |
| echo | |
| read -p "Domain name: " domain_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
| #!/bin/bash | |
| set -e | |
| command -v jq >/dev/null 2>&1 || { echo >&2 "I require jq but it's not installed (see: https://stedolan.github.io/jq/). Aborting."; exit 1; } | |
| command -v curl >/dev/null 2>&1 || { echo >&2 "I require curl but it's not installed (see: https://curl.haxx.se/). Aborting."; exit 1; } | |
| # Auth API Notes: http://forum.micasaverde.com/index.php/topic,24942.45.html | |
| # New Server domains listing: http://forum.micasaverde.com/index.php/topic,25859.0.html | |
| # Example implementations: | |
| # https://github.com/rickbassham/vera/blob/master/vera_test.py | |
| # https://github.com/amg0/ALTUI/blob/master/Remote/VeraloginAction.php |
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
| 'use strict'; | |
| var morgan = require('morgan'); | |
| var os = require('os'); | |
| morgan.token('conversation-id', function getConversationId(req) { | |
| return req.conversationId; | |
| }); | |
| morgan.token('session-id', function getSessionId(req) { | |
| return req.sessionId; |
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
| <?php | |
| namespace Application\Form; | |
| use Zend\Form\Form; | |
| use Zend\Form\Element; | |
| class FileUploadForm extends Form | |
| { | |
| public function __construct($name = null, $options = array()) |
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
| (ns my.server | |
| (:use org.httpkit.server | |
| [clojure.string :only [split trim lower-case]]) | |
| (:import [org.httpkit.server AsyncChannel])) | |
| (defn origin-match? [origin-re req] | |
| (if-let [req-origin (get-in req [:headers "origin"])] | |
| (re-matches origin-re req-origin))) |
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
| /** | |
| * Decorates the ui-bootstrap datepicker directive's controller to allow | |
| * refreshing the datepicker view (and rerunning invalid dates function) | |
| * upon an event trigger: `$scope.$broadcast('refreshDatepickers');` | |
| * | |
| * Works with inline and popup. Include this after `ui.bootstrap` js | |
| */ | |
| angular.module('ui.bootstrap.datepicker') | |
| .config(function($provide) { | |
| $provide.decorator('datepickerDirective', function($delegate) { |
NewerOlder