Skip to content

Instantly share code, notes, and snippets.

View vvscode's full-sized avatar
⌨️
Here is Rhodes, jump here!

Vasiliy Vanchuk vvscode

⌨️
Here is Rhodes, jump here!
View GitHub Profile
@vasanthk
vasanthk / System Design.md
Last active May 1, 2024 00:40
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@mrlesmithjr
mrlesmithjr / ansible-macos-homebrew-packages.yml
Last active April 29, 2024 10:40
Install MacOS Homebrew Packages With Ansible
---
- name: Install MacOS Packages
hosts: localhost
become: false
vars:
brew_cask_packages:
- atom
- docker
- dropbox
- firefox
@willurd
willurd / web-servers.md
Last active April 28, 2024 21:38
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@branneman
branneman / better-nodejs-require-paths.md
Last active April 27, 2024 04:16
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@kelvinn
kelvinn / cmd.sh
Created July 24, 2014 02:55
Example of using Apache Bench (ab) to POST JSON to an API
# post_loc.txt contains the json you want to post
# -p means to POST it
# -H adds an Auth header (could be Basic or Token)
# -T sets the Content-Type
# -c is concurrent clients
# -n is the number of requests to run in the test
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/
@michaellihs
michaellihs / tmux-cheat-sheet.md
Last active April 21, 2024 20:22
tmux Cheat Sheet
@marcojahn
marcojahn / conventional-commit-regex.md
Last active April 13, 2024 13:27
Conventional Commit Regex

the following regex will validate all examples provided here: https://www.conventionalcommits.org/en/v1.0.0/

  ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\([\w\-\.]+\))?(!)?: ([\w ])+([\s\S]*)

a grep/posix compatible variant

  ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\([[:alnum:]._-]+\))?(!)?: ([[:alnum:]])+([[:space:][:print:]]*)
@heron2014
heron2014 / react-native-maps-enable-google-maps-instructions.md
Last active April 11, 2024 09:39
Visual instructions how to enable Google Maps on IOS using react-native-maps

Visual instructions how to enable Google Maps on IOS using react-native-maps

UPDATE: Following instructions are now a year old. I have recently managed to upgrade react-native-maps from 0.17 to the latest version 0.21 with react-native 0.51 - if you want to follow my instruction scroll down to the end this doc! Hope that will work for you too!

This is for my personal use, things might not be correctly explained here. For the official docs please check https://github.com/airbnb/react-native-maps

Steps from scratch:

1.react-native init GoogleMapPlayground

@masak
masak / explanation.md
Last active April 11, 2024 02:50
How is git commit sha1 formed

Ok, I geeked out, and this is probably more information than you need. But it completely answers the question. Sorry. ☺

Locally, I'm at this commit:

$ git show
commit d6cd1e2bd19e03a81132a23b2025920577f84e37
Author: jnthn <jnthn@jnthn.net>
Date:   Sun Apr 15 16:35:03 2012 +0200

When I added FIRST/NEXT/LAST, it was idiomatic but not quite so fast. This makes it faster. Another little bit of masak++'s program.

@dublado
dublado / gist:cf8c4fbe359c686266eb7723a0a08c55
Created March 6, 2018 14:58
Apache Bench (ab) to POST JSON to an API
$ cat test.json
json='{ "timestamp" : 1484825894873, "test" : "test"}'
ab -c 10 -n 1000 -p test.json -T application/x-www-form-urlencoded https://example.com/test
#https://prabuddha.me/apache-bench-ab-post-json-api/