Skip to content

Instantly share code, notes, and snippets.

@jitinmaher
jitinmaher / StickyFunctionalComponent.js
Created November 25, 2018 16:00
Sticky header using hooks
import React from "react";
import { useEffect, useState } from "react";
import SomeRandomText from "./SomeRandomText";
import "./App.css";
function App() {
const fixedText = "I am fixed :)";
const whenNotFixed = "I am not a fixed header :(";
const [headerText, setHeaderText] = useState(whenNotFixed);
useEffect(() => {
@ProjectCheshire
ProjectCheshire / Auto.py
Last active August 16, 2020 13:19
Autoschemer.py
import os
import importlib
from inspect import getmembers, isclass
from graphene import ObjectType
from logzero import logger
def schema_operations_builder(operationName, operationModule, operationBase, clsName):
op_base_classes = build_base_classes(operationName, operationModule, operationBase, clsName)
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active April 5, 2025 17:25
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub
@ha7ilm
ha7ilm / ranger-cd-for-zshrc.sh
Created July 31, 2016 11:02
ranger-cd for zsh
#This is based on: https://github.com/ranger/ranger/blob/master/examples/bash_automatic_cd.sh
#Paste this into your .zshrc:
function ranger-cd {
tempfile="$(mktemp -t tmp.XXXXXX)"
/usr/bin/ranger --choosedir="$tempfile" "${@:-$(pwd)}"
test -f "$tempfile" &&
if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
cd -- "$(cat "$tempfile")"
fi
@alexkehayias
alexkehayias / org-mode-grammar.clj
Last active March 15, 2022 16:30
The start of an EBNF grammer to parse org-mode docs
(require '[instaparse.core :as insta])
(def org-parse
(insta/parser
"<DOC> = <EOL>* heading*
heading = level <SPC> [status <SPC>] text tag* [<EOL> content]
sub-heading = sub-level <SPC> [status <SPC>] text tag* [<EOL> content]
EOL = '\n' | '\r\n' | #'$'
SPC = ' '
level = #'\\*+'
@yelizariev
yelizariev / 1-Ubuntu-odoo-development.sh
Last active September 6, 2019 10:09
Ubuntu configuration for odoo development
sudo apt-get update
sudo apt-get install git python-pip htop moreutils tree nginx gimp wmctrl postgresql-server-dev-all
sudo apt-get upgrade
################### Github
# configure ssh keys: https://help.github.com/articles/generating-ssh-keys/
################### Odoo
# download odoo from git:
cd /some/dir/
@dreispt
dreispt / odoo-requests
Last active April 17, 2023 09:10
Munin plugins for Odoo
#!/bin/sh
#%# family=manual
#%# capabilities=autoconf suggest
# Munin plugin for transactions/minute
case $1 in
autoconf)
exit 0
;;
suggest)
@nagyv
nagyv / 0 - odoo logs to sentry
Last active December 5, 2018 06:49 — forked from avoine/gist:2912777
Script to send rsyslog message of OpenERP to Sentry
This gist provides a simple setup to add Sentry logging to OpenERP/Odoo.
As Odoo's logging setup is rather limited, I'm using syslog to collect and forward logs to Sentry.
These scripts should run without any modification on an Ubuntu based server, assuming the paths and user names for openerp match with the ones in the `supervisord.conf` file.
To have rsyslog2sentry run fine, you'll need some python pagkages installed
$ pip install raven loggerglue
@yelizariev
yelizariev / install-odoo.sh
Last active November 20, 2023 13:57
install odoo from source. Script is maintained on github now: https://github.com/yelizariev/install-odoo
if [ "$(basename $0)" = "install-odoo.sh" ]; then
echo "don't run install-odoo.sh, because it's not fully automated script. Copy, paste and execute commands from this file manually"
exit 0
fi
#### Detect type of system manager
export SYSTEM=''
pidof systemd && export SYSTEM='systemd'
@gear11
gear11 / main.py
Created December 17, 2013 14:54
Simple Python proxy server based on Flask and Requests. See: http:/python-proxy-server/gear11.com/2013/12/python-proxy-server/
"""
A simple proxy server. Usage:
http://hostname:port/p/(URL to be proxied, minus protocol)
For example:
http://localhost:8080/p/www.google.com
"""