Skip to content

Instantly share code, notes, and snippets.

💖
GITHUB DROP ICE

Cassie Jones porglezomp

💖
GITHUB DROP ICE
View GitHub Profile
@lynn
lynn / frac.rs
Last active Mar 19, 2020
A bitwise-magic fractional part function
View frac.rs
/// A "fractional part" function on f32s that does bitwise magic
/// on the representation of its argument.
pub fn frac(f: f32) -> f32 {
f32::from_bits(_frac(f.to_bits()))
}
/// A "fractional part" function that operates on a signed integer
/// representation of an IEEE single-precision floating point number.
fn _frac(i: u32) -> u32 {
// A floating point number consists of a sign bit,
View Homestuck Uses Discord.md

Homestuck Uses Discord

The Beta Kids

  • John - Is the owner, but doesn't really know how to run a server.
  • Rose - The only one with a good internet connection and a good mic. Always on topic.
  • Dave - Shitposter. Exclusively posts in #memes or if there is no meme channel, will post memes in every channel until one is made.
  • Jade - Pretty much everyone treats her like the actual owner of the server. Hangs out in #general to welcome newbies.

The Trolls

  • Karkat - Always in voice chat. His microphone is somehow the shittiest mic out of anyone.
@bishboria
bishboria / springer-free-maths-books.md
Last active Jul 10, 2020
Springer made a bunch of books available for free, these were the direct links
@porglezomp
porglezomp / README.md
Last active Aug 29, 2015
Do parametric animation in Unity3d, inspired by UIView animation in iOS
View README.md

How to use this

Installation

  1. Copy the PAnim.cs class into your Unity3d project
  2. You're done!

Animating Objects

@porglezomp
porglezomp / Extrap.cs
Last active Aug 31, 2018
Provides some of Unity's interpolation methods without clamping to [0, 1]
View Extrap.cs
using UnityEngine;
using System.Collections;
public class Extrap {
public static Quaternion Slerp(Quaternion q1, Quaternion q2, float t)
{
float angle;
Vector3 axis;
@softdetours
softdetours / seeyouspacecowboy.sh
Last active Sep 22, 2019
A shell script to display SEE YOU SPACE COWBOY whenever you logout of your terminal!
View seeyouspacecowboy.sh
#!/usr/bin/env bash
# SEE YOU SPACE COWBOY by D.K. REHN (softdetours.com)
# Displays a timeless message in your terminal with cosmic color effects
# Usage: add "sh ~/seeyouspacecowboy.sh; sleep 2" to .bash_logout (or similar) in your home directory
# (adjust the sleep variable to display the message for more seconds)
# Cosmic color sequence
View lifespan.py
import serial
class Lifespan(object):
def __init__(self):
self.connect()
def connect(self):
self.port = serial.Serial('/dev/tty.IHP-Serialport', 19200, timeout=1)
while self.port.read(1) != '':
@astrojuanlu
astrojuanlu / pep8magic.py
Last active Apr 27, 2017
IPython cell magic to check for PEP8 using https://pypi.python.org/pypi/pep8
View pep8magic.py
# IPython magic to check for PEP8 compliance.
# Author: Juan Luis Cano <juanlu001@gmail.com>
"""IPython magic to check for PEP8 compliance.
To use it, type
```%load_ext pep8magic```
and then
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active Jun 28, 2020
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!
View whiteboardCleaner.md

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@iamatypeofwalrus
iamatypeofwalrus / roll_ipython_in_aws.md
Last active Mar 9, 2020
Create an iPython HTML Notebook on Amazon's AWS Free Tier from scratch.
View roll_ipython_in_aws.md

What

Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.

What are we using? What do you need?

  • An active AWS account. First time sign-ups are eligible for the free tier for a year
  • One Micro Tier EC2 Instance
  • With AWS we will use the stock Ubuntu Server AMI and customize it.
  • Anaconda for Python.
  • Coffee/Beer/Time
You can’t perform that action at this time.