Skip to content

Instantly share code, notes, and snippets.

View mountainash's full-sized avatar
💭
Coding for pay. Coding for pleasure.

Mountain/\Ash mountainash

💭
Coding for pay. Coding for pleasure.
View GitHub Profile
@nikoheikkila
nikoheikkila / README.md
Last active June 4, 2025 07:26
Fish Shell function for sourcing standard .env files

envsource

⚠️ NOTE (20.5.2023): I don't really use this function at all anymore since there are now tools such as Taskfile, which reads the .env file for me sparing me the need to pollute my session with environment variables.


I've been using Fish shell for years which is great and all, but one thing that has got me frustrated is using it with .env files.

When attempting to run source .env in a project, I usually encounter this problem:

@gcoda
gcoda / ._Cloudflare_Worker.md
Last active January 17, 2025 13:17
Cloudflare Worker Template

Cloudflare Worker Typescript Starter

Opinionated Template

init

  1. npx degit https://gist.github.com/5a48a8afd9377b0dd3523f68af512f98.git my-new-worker
  2. mkdir src; mv _src_worker.ts src/worker.ts
  3. npm install
"indentRainbow.colors": [
"rgba(28, 40, 51, 0.05)",
"rgba(33, 47, 60, 0.05)",
"rgba(81, 90, 90, 0.05)",
"rgba(95, 106, 106, 0.05)",
"rgba(121, 125, 127,0.05)",
"rgba(151, 154, 154,0.05)"
],
@micc83
micc83 / mysqldump.php
Created June 5, 2017 13:17
Simple PHP script to dump a MySql database
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$database = 'db';
$user = 'user';
$pass = 'pass';
$host = 'localhost';
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"arrowFunctions": false, // enable arrow functions
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"classes": false, // enable classes
"defaultParams": false, // enable default function parameters
"destructuring": false, // enable destructuring
@CuriousGnu
CuriousGnu / beezid_scraper.py
Created April 3, 2016 14:15
Beezid.com - Auction Scraper
import pycurl
import json
import time
from StringIO import StringIO
i = 0
bnums = []
while True :
print(str(i))
@joneskoo
joneskoo / ssh-knownhosts-cleanup.py
Last active April 4, 2025 19:00
SSH known hosts cleanup script. Combines same fingerprints to one line.
#!/usr/bin/env python3
# encoding: utf-8
# By Joonas Kuorilehto 2011, MIT license
#
# The script combines .ssh/known_hosts so that each fingerprint is only
# listed once.
import re
import sys
import os
@tbtlr
tbtlr / get_barcode_from_image.js
Created June 1, 2010 19:33
Barcode recognition with JavaScript - Demo: http://bit.ly/djvUoy
/*
* Copyright (c) 2010 Tobias Schneider
* This script is freely distributable under the terms of the MIT license.
*/
(function(){
var UPC_SET = {
"3211": '0',
"2221": '1',
"2122": '2',