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
function createLoggedProxy(obj) { | |
var traps = {}; | |
for (let trap of Object.getOwnPropertyNames(Reflect)) { | |
traps[trap] = (...args) => { | |
console.log(trap, ...args.slice(0, -1)); // Last arg is always the proxy, no need to log it | |
return Reflect[trap](...args); | |
} | |
} | |
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
dialog { | |
position: fixed; | |
top: 50%; | |
left: 50%; | |
right: auto; | |
padding: 30px; | |
transform: perspective(500px) translate(-50%, -50%); | |
background: linear-gradient(to bottom, #FFF, #F4F4F4) #FFF; | |
border: none; | |
border-radius: 3px; |
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
## Must have sqlite3 installed. Homebrew user? brew install sqlite | |
## Can be ran directly in command line and will place file directory where ran | |
## Remove `-header` if you don't want the output to have the column name `item` | |
## Checkout more options and Workflow - https://github.com/T-Rave/alfred-clipboard-dump | |
# dumps output with list option since single column. Produces cleaner data without double quotes | |
sqlite3 -header -list ~/Library/Application\ Support/Alfred\ 3/Databases/clipboard.alfdb "SELECT item FROM clipboard;" > clipboard-dump.txt | |
# dumps full table to csv format | |
sqlite3 -header -csv ~/Library/Application\ Support/Alfred\ 3/Databases/clipboard.alfdb "SELECT * FROM clipboard;" > clipboard-dump.csv | |
# dumps only items in descending (inverse) order with no column name | |
sqlite3 -list ~/Library/Application\ Support/Alfred\ 3/Databases/clipboard.alfdb "SELECT item FROM clipboard ORDER BY item DESC;" > clipdump.txt |
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
const generateAccesskey = (method, password, ip, port) => { | |
const firstPart = btoa(`${method.toLowerCase()}:${password}`) | |
const secondPart = `${ip}:${port}` | |
const accesskey = `ss://${firstPart}@${secondPart}` | |
return accesskey | |
} |
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
@Component({ | |
selector: 'app-my-content', | |
template: '<ng-container *ngTemplateOutlet="tplRef"></ng-container>', | |
}) | |
class MyContent { | |
@ContentChild('myContent', {static: true}) tplRef: TemplateRef<any>; | |
} |
OlderNewer