- Getting started with React & Typescript
This file contains 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
git config --global url."https://".insteadOf git:// |
This file contains 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(){ | |
"use strict"; | |
(function() { | |
console.log(this); | |
})(); | |
function test() { | |
console.log(this); | |
} |
This file contains 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
# Set this to 1 to enable startup | |
ENABLED=1 | |
# The user to run Kodi as | |
USER=root | |
# Adjust niceness of Kodi (decrease for higher priority) | |
NICE=-5 |
This file contains 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
# Just point the sleepimage to your .Trash folder and empty your trash bin after wake up. | |
# http://apple.stackexchange.com/a/191563 | |
sudo pmset -a hibernatefile ~/.Trash/sleepimage |
This file contains 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
{"lastUpload":"2020-07-15T12:52:30.621Z","extensionVersion":"v3.4.3"} |
This file contains 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 compose = (...callbacks) => ( | |
(...args) => ( | |
callbacks.reduce((prev, callback) => ( | |
[callback(...prev)] | |
), args) | |
) | |
); | |
compose( | |
(x) => (x * 2), |
This file contains 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' | |
const fs = require('fs') | |
const Hapi = require('hapi') | |
const Http2 = require('http2') | |
const server = new Hapi.Server() | |
let listener = Http2.createServer({ | |
key: fs.readFileSync('./key.pem'), | |
cert: fs.readFileSync('./cert.pem') | |
}) |
This file contains 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
// `Omit` omit specific keys from existing interface | |
type Diff<T extends string, U extends string> = ({[P in T]: P } & {[P in U]: never } & { [x: string]: never })[T]; | |
type Omit<T, K extends keyof T> = {[P in Diff<keyof T, K>]: T[P]}; | |
// `Omit` usage | |
type TCleanedUser = Omit<IUser, 'privateField1' | 'privateField2'>; |
This file contains 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 node | |
const path = require('path') | |
const generatorHelper = require('@prisma/generator-helper') | |
const { Project, StructureKind, VariableDeclarationKind } = require('ts-morph') | |
generatorHelper.generatorHandler({ | |
onManifest(config) { | |
return { | |
prettyName: 'Filters', | |
defaultOutput: path.resolve(__dirname, 'filters'), |
OlderNewer