Skip to content

Instantly share code, notes, and snippets.

View curioustushar's full-sized avatar
🎯
Focusing

Tushar Gupta curioustushar

🎯
Focusing
View GitHub Profile
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active December 11, 2025 18:09
crack activate Office on mac with license file
@vijay22sai
vijay22sai / oracle-code-event-notes
Last active April 5, 2018 14:49
20 ways to boost your developer productivity by @DaschnerS
1. throw mouse :D, try mechanical keyboard e.g: daskeyboard (german) , topre (japanese)
2. embrace keyboard shortcuts (macros etc) (explore gmail vim mode)
3. unix command line
4. shell aliases
5. shell scripts are your friends!! (e.g: ssh and cd to mbaas?) low hanging fruit!?
@mcfdn
mcfdn / Multiple Deploy Keys in GitHub.md
Last active October 22, 2025 18:39
Using multiple GitHub deploy keys on a single server with a single user

Using multiple GitHub deploy keys on a single server with a single user

Within GitHub it is possible to set up two types of SSH key - account level SSH keys and and repository level SSH keys. These repository level SSH keys are known in GitHub as deploy keys.

Deploy keys are useful for deploying code because they do not rely on an individual user account, which is susceptible to change, to “store” the server keys.

There is, however, an ‘issue’ with using deploy keys; each key across all repositories on GitHub must be unique. No one key can be used more than once. This becomes a problem when deploying to repositories to the same server with the same user. If you create two keys, the SSH client will not know which key to use when connecting to GitHub.

One solution is to use an SSH config file to define which key to use in which situation. This isn’t as easy as it seems.. you might try something like this:

@tduarte
tduarte / publish-ghpages.md
Last active October 5, 2025 09:29
If you need to force push an subtree
git checkout master # you can avoid this line if you are in master...
git subtree split --prefix dist -b gh-pages # create a local gh-pages branch containing the splitted output folder
git push -f origin gh-pages:gh-pages # force the push of the gh-pages branch to the remote gh-pages branch at origin
git branch -D gh-pages # delete the local gh-pages because you will need it: ref
@transitive-bullshit
transitive-bullshit / logger.js
Last active July 9, 2024 04:09
winston logger with filename:linenumber
// NOTE: this adds a filename and line number to winston's output
// Example output: 'info (routes/index.js:34) GET 200 /index'
var winston = require('winston')
var path = require('path')
var PROJECT_ROOT = path.join(__dirname, '..')
var logger = new winston.logger({ ... })
// this allows winston to handle output from express' morgan middleware
@jkjustjoshing
jkjustjoshing / promise.any-slim.js
Last active July 19, 2017 10:11
Promise.any() – A Missing Use Case
Promise.any = function(arrayOfPromises) {
// For each promise that resolves or rejects,
// make them all resolve.
// Record which ones did resolve or reject
var resolvingPromises = arrayOfPromises.map(function(promise) {
return promise.then(function(result) {
return {
resolve: true,
result: result
};
@morhekil
morhekil / nginx.conf
Created August 14, 2014 12:18
Full request/response body logging in nginx
http {
log_format bodylog '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" $request_time '
'<"$request_body" >"$resp_body"';
lua_need_request_body on;
set $resp_body "";
body_filter_by_lua '
@h0tw1r3
h0tw1r3 / aria2.daemon
Last active February 27, 2025 10:16
Aria2c systemd service
continue
dir=/var/www/downloads
file-allocation=falloc
max-connection-per-server=4
max-concurrent-downloads=2
max-overall-download-limit=0
min-split-size=25M
rpc-allow-origin-all=true
rpc-secret=YouShouldChangeThis
input-file=/var/tmp/aria2c.session
@trevnorris
trevnorris / perf-flame-graph-notes.md
Last active September 30, 2025 01:16
Quick steps of how to create a flame graph using perf

The prep-script.sh will setup the latest Node and install the latest perf version on your Linux box.

When you want to generate the flame graph, run the following (folder locations taken from install script):

sudo sysctl kernel.kptr_restrict=0
# May also have to do the following:
# (additional reading http://unix.stackexchange.com/questions/14227/do-i-need-root-admin-permissions-to-run-userspace-perf-tool-perf-events-ar )
sudo sysctl kernel.perf_event_paranoid=0
@msurguy
msurguy / List.md
Last active November 29, 2025 02:37
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):