Skip to content

Instantly share code, notes, and snippets.

View eagleEggs's full-sized avatar
🍦

eagleEggs

🍦
  • Washington, DC
View GitHub Profile
@msklywenn
msklywenn / BatchBuilderSettings.cs
Last active May 18, 2022 14:32
Unity Batch Builder
// DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
// Version 2, December 2004
//
// Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
//
// Everyone is permitted to copy and distribute verbatim or modified
// copies of this license document, and changing it is allowed as long
// as the name is changed.
//
// DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@jerblack
jerblack / user32.py
Last active May 2, 2023 13:26
Find and move windows in Windows with ctypes and user32 in Python
import ctypes
user32 = ctypes.windll.user32
# get screen resolution of primary monitor
res = (user32.GetSystemMetrics(0), user32.GetSystemMetrics(1))
# res is (2293, 960) for 3440x1440 display at 150% scaling
user32.SetProcessDPIAware()
res = (user32.GetSystemMetrics(0), user32.GetSystemMetrics(1))
# res is now (3440, 1440) for 3440x1440 display at 150% scaling
@PixelScream
PixelScream / GravityWarp.shader
Created March 28, 2018 21:24
Gravity Warp Shader
Shader "Unlit/GravityWarp"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Tags {
"RenderType"="Opaque"
@thousandlemons
thousandlemons / how-to-connect-django-to-remote-mysql.md
Created November 1, 2016 09:06
How to Connect Django to Remote MySQL

How to Connect Django to Remote MySQL

==[ONLY for Ubuntu]== Install libmysqlclient-dev

$ sudo apt-get install libmysqlclient-dev

Install mysqlclient.

@fopina
fopina / mic_client.py
Created July 28, 2016 12:24
microphone streaming with pyAudio
#!/usr/bin/env python
import pyaudio
import socket
import sys
FORMAT = pyaudio.paInt16
CHANNELS = 1
RATE = 44100
CHUNK = 4096
@RichardBronosky
RichardBronosky / pep8_cheatsheet.py
Created December 27, 2015 06:25
PEP-8 cheatsheet
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""This module's docstring summary line.
This is a multi-line docstring. Paragraphs are separated with blank lines.
Lines conform to 79-column limit.
Module and packages names should be short, lower_case_with_underscores.
Notice that this in not PEP8-cheatsheet.py
@BlackArbsCEO
BlackArbsCEO / Free_Intraday_StockData_Test_BarChart_API_Gist.py
Created September 22, 2015 19:48
Example code from 'Get Free Intraday Stock Data With Python and BarChart OnDemand API' blog post.
# -*- coding: utf-8 -*-
import time
t0 = time.clock()
import pandas as pd
from pandas.tseries.offsets import BDay
import numpy as np
import datetime as dt
from copy import copy
@PurpleBooth
PurpleBooth / README-Template.md
Last active September 23, 2024 09:44
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@keijiro
keijiro / prng.cginc
Last active May 15, 2024 13:23
One liner pseudo random generator with HLSL
float nrand(float2 uv)
{
return frac(sin(dot(uv, float2(12.9898, 78.233))) * 43758.5453);
}
///
/// Simple pooling for Unity.
/// Author: Martin "quill18" Glaude (quill18@quill18.com)
/// Latest Version: https://gist.github.com/quill18/5a7cfffae68892621267
/// License: CC0 (http://creativecommons.org/publicdomain/zero/1.0/)
/// UPDATES:
/// 2015-04-16: Changed Pool to use a Stack generic.
///
/// Usage:
///