- Create or find a gist that you own.
- Clone your gist (replace
<hash>
with your gist's hash):# with ssh git clone git@gist.github.com:<hash>.git mygist # with https
git clone https://gist.github.com/.git mygist
const zipRun: <T>(items: T[], commands: Array<(item: T) => unknown>) => void = (items, commands) => { | |
items.forEach((item, index) => commands[index](item)); | |
} |
# User-specific files | |
*.suo | |
*.user | |
*.userosscache | |
*.sln.docstates | |
# Build results | |
[Dd]ebug/ | |
[Dd]ebugPublic/ | |
[Rr]elease/ |
const Foo = { | |
aFoo: 'SomeAfoo' as 'SomeAfoo', | |
bFoo: 'SomeBfoo' as 'SomeBfoo', | |
cFoo: 'SomeCfoo' as 'SomeCfoo', | |
}; | |
type FooValueTypes = (typeof Foo)[keyof typeof Foo]; | |
function doStuff(value: FooValueTypes) { | |
} |
<hash>
with your gist's hash):
# with ssh
git clone git@gist.github.com:<hash>.git mygist
# with https
git clone https://gist.github.com/.git mygist
{ | |
// See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. | |
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp | |
// List of extensions which should be recommended for users of this workspace. | |
"recommendations": [ | |
"angular.ng-template", | |
"mikael.angular-beastcode", | |
"msjsdiag.debugger-for-chrome", | |
"ryu1kn.annotator", |
curl -X POST http://localhost:9200/_reindex?pretty=true -d '{ | |
"source": { | |
"index": "dev_1" | |
}, | |
"dest": { | |
"index": "dev_2" | |
} | |
}' |
curl -X GET http://localhost:9200/dev-1/categorysearchproductmodel/_search?pretty=true -d '{ | |
"sort" : [ | |
{ "_uid" : {"order" : "asc"}} | |
], | |
"query": { | |
"match_all": {} | |
} | |
}' > els-now.json |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
version: "2.2" | |
services: | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:6.0.0 | |
container_name: elasticsearch | |
environment: | |
- cluster.name=docker-cluster | |
- bootstrap.memory_lock=true | |
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" | |
ulimits: |
const https = require('https'); | |
module.exports = function (context, req) { | |
context.log('JavaScript HTTP trigger function processed a request.'); | |
https.get('https://ifconfig.co/json', res => { | |
res.setEncoding('utf8'); | |
let body = ''; | |
res.on('data', data => { | |
body += data; |