Skip to content

Instantly share code, notes, and snippets.

View teamgroove's full-sized avatar

René teamgroove

  • SMILEUPPS-F091BA1E67
  • -`ღ´-
View GitHub Profile
@tomhicks
tomhicks / plink-plonk.js
Last active December 26, 2025 08:35
Listen to your web pages
@tigerhawkvok
tigerhawkvok / poetry-convert.py
Last active December 11, 2024 16:22
Convert a requirements.txt file to a Poetry project
#!python3
"""
Convert a requirements.txt file to a Poetry project.
Just place in the root of your working directory and run!
"""
sourceFile = "./requirements.txt"
import re
import os
function _isEvent(prop) {
if (0 !== prop.indexOf('on')) {
return false;
}
return true;
}
function _getEvents(obj) {
version: '3.1'
services:
reverse-proxy:
image: traefik # The official Traefik docker image
command: --api --docker # Enables the web UI and tells Traefik to listen to docker
ports:
- "80:80" # The HTTP port
- "8080:8080" # The Web UI (enabled by --api)
volumes:
- /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events
@eliashussary
eliashussary / metabase-postgres.docker-compose.yml
Created December 11, 2018 16:45
A docker-compose file for metabase with postgres.
version: "3"
services:
postgres-db:
image: postgres
restart: always
ports:
- 5432:5432
environment:
POSTGRES_PASSWORD: postgres
@dmarmugi
dmarmugi / stopCFAppsInSpace.sh
Created August 23, 2017 20:15
Stop all Cloud Foundry apps in a space
cf apps | grep started | awk '{print $1}{system("cf sp " $1)}'
@crittermike
crittermike / wget.sh
Last active May 5, 2026 11:30
Download an entire website with wget, along with assets.
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
@bjunc
bjunc / graphql-axios.js
Last active January 12, 2024 05:34
application/graphql vs application/json using axios
let input = { first_name: 'Foo', last_name: 'Bar' };
// application/graphql example
/* eslint-disable no-unused-vars */
let configGraphQL = {
url: '/graphql',
method: 'post',
headers: { 'Content-Type': 'application/graphql' },
data: `mutation { user(id: 1, input: ${ JSON.stringify(input) }){ full_name } }`
};
@blakek
blakek / queryStringParse.js
Last active January 22, 2021 12:47
Parse query string in browser (<=ES5)
// Deserialize query string to object
// Example: var queryParams = queryStringParse(window.location.search)
function queryStringParse (str) {
var ret = Object.create(null)
if (typeof str !== 'string') {
return ret
}
str = str.trim().replace(/^(\?|#|&)/, '')