Skip to content

Instantly share code, notes, and snippets.

View gregkepler's full-sized avatar

Greg Kepler gregkepler

View GitHub Profile
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active June 8, 2024 06:11
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@amatellanes
amatellanes / celery.sh
Last active June 8, 2024 20:40
Celery handy commands
/* Useful celery config.
app = Celery('tasks',
broker='redis://localhost:6379',
backend='redis://localhost:6379')
app.conf.update(
CELERY_TASK_RESULT_EXPIRES=3600,
CELERY_QUEUES=(
Queue('default', routing_key='tasks.#'),
@n3dst4
n3dst4 / ConEmu Git Bash.md
Last active July 19, 2022 17:11
My ConEmu / Cmder git bash task config
  1. Open Conemu

  2. Open Settings -> Tasks or go to new tab button -> Setup tasks.

  3. Click + to add a new task

  4. Enter the name as Git Bash or whatever you like

  5. Task parameters:

     /icon "C:\Program Files (x86)\Git\etc\git.ico" /dir "C:\_git"
    
  6. Command:

@geoffreymcgill
geoffreymcgill / index.html
Created January 19, 2015 06:19
Prism with Copy to Clipboard
<!doctype html>
<html>
<head>
<title>Prism Copy to Clipboard sample</title>
<link rel="stylesheet" href="prism.css" type="text/css" media="screen" />
<link rel="stylesheet" href="toolbar.css" type="text/css" media="screen" />
<script type="text/javascript" src="prism.js"></script>
<!-- Adapted from http://dev.misterphilip.com/prism/plugins/toolbar/ -->
@lsapan
lsapan / vue-cli-django.md
Last active December 29, 2022 10:47
Using Vue CLI to start a Vue frontend for use with a Django backend

Using Vue CLI to start a Vue frontend for use with a Django backend

Note: This guide has been updated for use with @vue/cli version 4! Please make sure you're using the latest version of @vue/cli.

When it comes to starting new Vue projects, you can't really beat Vue CLI. The Vue team has done a phenomenal job of making an easy-to-use tool for getting started with reasonable defaults. If you're using Django though, you may not have the easiest time getting its static system and webpack to play well together.

A good chunk of this is applicable to any webpack-compiled frontend and Django, but we'll focus specifically on the steps involved with Vue CLI.

As a quick heads up: this tutorial assumes you're creating your Vue project in a folder named frontend inside of your Django project folder. If you want it named something else, or want it in a different folder, just update the paths accordingly.

@gregkepler
gregkepler / ffmpeg-background-color.bat
Created March 19, 2019 21:08
ffmpeg transparent png background color
ffmpeg -f lavfi -i color=c=black:s=1280x720 -i "C:\path\to\image.png" -shortest -filter_complex "[0:v][1:v]overlay=shortest=1,format=yuv420p[out]" -map "[out]" "C:path\to\output\out.mp4"
@erickhaendel
erickhaendel / generate-apk-debug.md
Last active June 3, 2024 19:46
Generate APK debug in React Native

Please follow those steps.

Bundle your js:

  • if you have index.android.js in project root then run
  react-native bundle --dev false --platform android --entry-file index.android.js --bundle-output ./android/app/build/intermediates/assets/debug/index.android.bundle --assets-dest ./android/app/build/intermediates/res/merged/debug