Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
unity and python is all a man needs

Badjano badjano

💭
unity and python is all a man needs
View GitHub Profile
@tobek
tobek / get-image-urls.js
Last active Jul 8, 2022
Save images from chrome inspector/dev tools network tab
View get-image-urls.js
/* open up chrome dev tools (Menu > More tools > Developer tools)
* go to network tab, refresh the page, wait for images to load (on some sites you may have to scroll down to the images for them to start loading)
* right click/ctrl click on any entry in the network log, select Copy > Copy All as HAR
* open up JS console and enter: var har = [paste]
* (pasting could take a while if there's a lot of requests)
* paste the following JS code into the console
* copy the output, paste into a text file
* open up a terminal in same directory as text file, then: wget -i [that file]
*/
View gist:3b19447b304616f18657
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@xero
xero / irc.md
Last active Jul 28, 2022
irc cheat sheet
View irc.md

IRC Reference

Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.

The Basics

  • /join #channel
    • Joins the specified channel.
  • /part #channel
  • Leaves the specified channel.
View gist:94bf9defe05c0ceee976
# __ __
# / \ / \
# \__/ | |
# __ | | __
# / \______| | ________ ________ __| |__ ________
# | ______ | / __ \ / _____| |__ __| / _____|
# | | \__/ | / \ | | |_____ | | | |_____
# | | __ | | | | \_____ \ | | \_____ \
# | | / \ | \__/ | _____| | | |__ _____| |
# \__/ \__/ \________/ |________/ \_____| |________/
View Effective_Engineer.md

FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

View ppm.py
#!/usr/bin/env python
import math
import pygame
import random
import rtmidi
from rtmidi.midiconstants import *
import time
TAU = 2 * math.pi
@jrh-spg
jrh-spg / diskclone.sh
Last active Nov 17, 2021
Disk Cloner Script that uses dd to clone disks
View diskclone.sh
#!/bin/bash
# https://asciinema.org/a/6LZefsbvLjgsuwQHOnQsBEaSj
IF=notset
OF=notset
BS=128M
CURDIR=$(dirname $(realpath -s $0))
SCRIPT=`basename "$0"`
if [[ ! -f /usr/bin/pv ]]; then
echo "pv is not installed. Please install pv and try again"
@positlabs
positlabs / ShadowShader.shader
Created Jan 20, 2018
Unity shader for rendering shadows onto a transparent surface. Useful for augmented reality.
View ShadowShader.shader
Shader "ShadowShader" {
Properties{
_Color("Main Color", Color) = (1,1,1,1)
_MainTex("Base (RGB)", 2D) = "white" {}
_Cutoff("Cutout", Range(0,1)) = 1.0
}
SubShader{
Pass{
Alphatest Greater[_Cutoff] SetTexture[_MainTex]
@bchanudet
bchanudet / readme.md
Last active Aug 19, 2021
Framebuffer on ST7735s (1.44inch LCD HAT)
View readme.md

Enable modules in Kernel

In raspi-config

Enable SPI under "Interfacing options"

Add modules

$ sudo nano /etc/modules
@JdaieLin
JdaieLin / 1.3_LCD_HAT_install.md
Last active Mar 6, 2021
Install waveshare 1.3 LCD HAT on Raspbian
View 1.3_LCD_HAT_install.md

在树莓派上点亮微雪1.3寸LCD HAT所需的安装步骤,重新梳理了一下安装顺序。

使用最新Raspbian镜像,联网进行安装。

安装 WiringPi

cd ~
git clone git://git.drogon.net/wiringPi
cd wiringPi
./build