Skip to content

Instantly share code, notes, and snippets.

View jeremejazz's full-sized avatar

Jereme Causing jeremejazz

View GitHub Profile
@jeremejazz
jeremejazz / require_all.php
Last active January 9, 2024 22:19
PHP require all files in folder
<?php
$files = glob( __DIR__ . '/folder/*.php');
foreach ($files as $file) {
require($file);
}
@jeremejazz
jeremejazz / organize_packt_videos.py
Created November 14, 2022 14:09
This script is used for organizing Packtpub downloaded course into directories containing titles especially those purchased from Humblebundle.
#!/usr/bin/env python
"""
======================================================================
MIT License
Copyright (c) [year] [fullname]
Permission is hereby granted, free of charge, to any person obtaining a copy
@jeremejazz
jeremejazz / blockchain-tutorial-links.md
Last active August 27, 2022 08:21
Free Blockchain tutorials
@jeremejazz
jeremejazz / huling_el_bimbo.rb
Last active February 12, 2022 10:35
ang huling while loop (chords only)
# Ang Huling El Bimbo by Eraserheads in Sonic Pi
use_bpm 90
define :main do | start_tick = 0 |
use_synth :pluck
with_fx :reverb, room: 1 do
if start_tick > 0
tick_set start_tick
@jeremejazz
jeremejazz / installing_gdal.md
Last active January 16, 2022 03:14
Installing Gdal with Anaconda

Installing GDAL with Anaconda

Here are steps to install GDAL in Anaconda with python bindings.

  1. Download and Install Anaconda (or Miniconda for minimal setup) For Windows a shortcut to anaconda prompt will be created in the start menu which should open command prompt with conda activated. In Linux you will be asked to make conda automatically start whenever bash starts. You can also activate it manually.
  2. (Optional. You can skip this if you want to only use base) Create a Conda environment with python.
conda create -n geospatial python=3.9
@jeremejazz
jeremejazz / functions.php
Created July 13, 2013 09:41
Play Audio in WordPress Excerpt
<?php
/*Add this code to
functions.php
From: http://premium.wpmudev.org/forums/topic/audio-preview-in-product-excerpt#post-280140
*/
function add_audio_to_excerpt( $excerpt ){
@jeremejazz
jeremejazz / addslashes.js
Created September 30, 2013 02:19
Addslashes function from PHP.js
function addslashes (str) {
// http://kevin.vanzonneveld.net
// + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// + improved by: Ates Goral (http://magnetiq.com)
// + improved by: marrtins
// + improved by: Nate
// + improved by: Onno Marsman
// + input by: Denny Wardhana
// + improved by: Brett Zamir (http://brett-zamir.me)
// + improved by: Oskar Larsson Högfeldt (http://oskar-lh.name/)
@jeremejazz
jeremejazz / emedia_pianomethod_linux.md
Last active July 10, 2021 05:00
How to Install Emedia Piano & Keyboard Method on Ubuntu (using WINE)

Install Emedia Piano & Keyboard method on Ubuntu (using WINE)

self notes

sudo apt install fluidsynth
@jeremejazz
jeremejazz / polygonCenter.js
Last active February 22, 2021 21:19
Return Center polygon in google maps v3. This does not apply to some shapes though. I recommend using turf.js instead https://turfjs.org/
function polygonCenter(poly) {
var lowx,
highx,
lowy,
highy,
lats = [],
lngs = [],
vertices = poly.getPath();
for(var i=0; i<vertices.length; i++) {
@jeremejazz
jeremejazz / map.js
Last active July 16, 2020 20:16
Leaflet Webpack Sample
import L from 'leaflet';
import 'leaflet/dist/leaflet.css';
import 'leaflet-defaulticon-compatibility/dist/leaflet-defaulticon-compatibility.webpack.css'; // Re-uses images from ~leaflet package