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
| # this creates a (ba)sh function, so if you want to use it source it in your shell. | |
| # Or copy it into it for a one time use | |
| # enable/disable keychron keyboard to be editable from the web UI | |
| # e.g. Don't trust the web UI to modify my keyboard by default | |
| keychronctl() { | |
| local action=$1 | |
| echo "🔍 Scanning Keychron devices (excluding 'Link' interfaces)..." |
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
| # Notes. -- Some useful windows commands I used recently | |
| # shutdown no hibernate: `shutdown /s /t 0` | |
| # turn off hibernate: `powercfg /h off` | |
| # User profile info: `Get-CimInstance Win32_UserProfile | Select-Object LocalPath, SID, Loaded, Special` | |
| # Allow powershell script execution: `Set-ExecutionPolicy -Scope Process RemoteSigned` | |
| # Get all local users (to match SIDs) | |
| $localUsers = Get-LocalUser | Select-Object Name, SID |
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: | |
| # $ chmod +x init-letsencrypt.sh | |
| # $ init-letsencrypt.sh mydomain.com [email protected] 1 | |
| # | |
| # Reference: | |
| # https://medium.com/@pentacent/nginx-and-lets-encrypt-with-docker-in-less-than-5-minutes-b4b8a60d3a71 | |
| domain=${1} |
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
| <link rel="import" href="../paper-tabs/paper-tabs.html"> | |
| <link rel="import" href="../paper-tabs/paper-tab.html"> | |
| <polymer-element name="my-element"> | |
| <template> | |
| <style> | |
| :host { | |
| position: absolute; | |
| width: 100%; |
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 | |
| function usersearchAction(){ | |
| $result = $this->_helperUser->searchAction( | |
| $this->_getParam('query'), | |
| Zend_Json::decode($this->_getParam('option', '[]')), | |
| $this->getDbSearchQuery(); | |
| ); | |
| $this->setData($result)->setSuccess(true); | |
| } |