I hereby claim:
- I am patmigliaccio on github.
- I am patmigliaccio (https://keybase.io/patmigliaccio) on keybase.
- I have a public key ASCBxsyiCy5TXXNF83e18qN1B-1Ya9YD6ow6XsOVnGxcIgo
To claim this, I am signing this object:
#!/bin/sh | |
# Reference: https://stackoverflow.com/a/38860/5199198 | |
SERVER=SERVER_NAME | |
USER=USER_NAME | |
DOMAIN=DOMAIN_NAME | |
/usr/bin/rdesktop -g 1152x864 \ | |
-a 16 \ |
#!/bin/sh | |
# Reference: https://medium.com/millennial-falcon-technology/reformatting-your-code-base-using-prettier-or-eslint-without-destroying-git-history-35052f3d853e | |
git filter-branch --tree-filter 'prettier --config ../../.prettierrc --write "src/{app,environments,assets}/**/*{.ts,.js,.json,.css,.scss}" || echo "formatting error"' -- --all |
#!/bin/sh | |
# RDP into Azure VM / Windows machine using `xfreerdp` | |
# | |
# Reference: https://github.com/FreeRDP/FreeRDP/issues/2128#issuecomment-213505787 | |
# | |
# Required dependency: http://www.freerdp.com/ | |
# | |
# Preferred over `rdesktop` due to: https://github.com/rdesktop/rdesktop/issues/71 |
/** | |
* A quick Go script, testing the performance of using | |
* concurrent channels for HTTP requests. | |
* | |
* Example: | |
* $ go run concurrent_http.go https://google.com https://facebook.com | |
* | |
* -- Consecutive -- | |
* GET: https://google.com | |
* 0.61 elapsed with response length: 10711 https://google.com |
I hereby claim:
To claim this, I am signing this object:
#!/bin/sh | |
# Author: Pat Migliaccio <pat@patmigliaccio.com> | |
# License: MIT | |
EMAIL="<Acct_Email>" | |
ZONE="<Zone_ID>" | |
API_KEY="<API_Key>" | |
DATA="{ \"files\": [\"https://example.com/css/style.css\"] }" |
/** | |
* A Go script that pulls Uber ride history and fare details | |
* | |
* Example: | |
* $ go run concurrent_http.go | |
* | |
* New York | Base: $1.16 -- Duration Cost: $2.32 -- Distance Cost (mile): $4.53 -- Service Fees: $2.35 -- Duration: 13.67min | |
* New Jersey | Base: $1.16 -- Duration Cost: $0.66 -- Distance Cost (mile): $1.83 -- Service Fees: $2.35 -- Duration: 3.88min | |
* New Jersey | Base: $1.10 -- Duration Cost: $0.86 -- Distance Cost (mile): $1.94 -- Service Fees: $2.20 -- Duration: 5.40min | |
* New Jersey | Base: $1.10 -- Duration Cost: $2.38 -- Distance Cost (mile): $1.47 -- Service Fees: $2.20 -- Duration: 14.87min |
const activeUsers = await post.getActiveUsers(); |
[ | |
{ | |
id: '8190834', | |
commentIds: [ '0002434', '0002437', '0002440' ] | |
}, | |
{ | |
id: '8190835', | |
commentIds: [ '0002436', '0002437', '0002441' ] | |
} | |
] |
const activeUsers = await post.getActiveUsers(); | |
const activeUsersComments = activeUsers.map(user => { | |
user.comments = user.commentIds.map(async commentId => { | |
return await comments.getCommentById(commentId) | |
}); | |
return user; | |
}); |