Skip to content

Instantly share code, notes, and snippets.

View MeharGaur's full-sized avatar
🦾

Mehar MeharGaur

🦾
View GitHub Profile
@robot-dreams
robot-dreams / goldenSpiral.pde
Last active May 3, 2023 09:56
Draw a golden spiral with Processing
float PHI = (1 + sqrt(5)) / 2;
void goldenSpiral(float h) {
// Base case: stop drawing if the height is too small.
if (h < 2) {
return;
}
// Draw bounding box and quarter circle. For some reason, using 2 * h - 1
// looks better than using 2 * h.
@ryanermita
ryanermita / storing_nested_objects_in_redis.py
Created May 17, 2018 14:36
Storing nested objects in redis sample code which you can use to play around in python and redis.
import redis # install redis via pip > `python -m pip install redis`
import json
# Instantiate redis connection with your local redis instance.
redis_connection = redis.StrictRedis(host="localhost", port=int(6379),
decode_responses=True)
"""
Caching simple object (flat and one dimentional object) as redis hash.
"""
@chhib
chhib / Dockerfile
Created January 10, 2019 18:43
Companion files used in the episode "Trying Kubernetes for the First Time" on the DevTips channel: https://youtu.be/ZSuh_nNPGls
FROM node
EXPOSE 8080
COPY app.js .
CMD node app.js
@jifalops
jifalops / _README.md
Last active June 30, 2019 18:53
Headless Crostini quick setup script for Flutter, VS Code, Node/npm (via nvm), Firebase tools, and pip for Python3

Headless Crostini quick setup script for Flutter, VS Code, Node/npm (via nvm), Firebase tools, and pip for Python3

Modify lines 20 and 21 with your gist and token for the VS Code settings-sync extension.

The script adds a symbolic link to the ChromeOS Downloads folder at ~/Downloads. For it to work, share your Downloads folder with Linux by right-clicking it in the Files app.

WARNING

  • The script appends to the PATH environment variable each time it runs (at the end).
  • settings.json for VS Code will be overwritten if it exists! (The default settings are empty and it was easier to do it this way than to use jq.)