Skip to content

Instantly share code, notes, and snippets.

View graysonarts's full-sized avatar
🍑
language hunting

Grayson (he/him) graysonarts

🍑
language hunting
View GitHub Profile
@graysonarts
graysonarts / string_value_type_macro.rs
Last active November 21, 2023 18:21
Helpful Macros for common rust things I run into
macro_rules! string_value_type {
($TypeName:ident $(~$derive_name:ident)*) => {
#[derive($($derive_name),*)]
pub struct $TypeName(String);
impl From<&str> for $TypeName {
fn from(value: &str) -> Self {
Self(value.to_owned())
}
}
anonymous
anonymous / collab.pde
Created October 4, 2014 14:50
Processing collab example code - metaglitch.com
// Code by @MetaGlitch
float fps = 16.666;
int inFrames = 15;
int outFrames = 15;
int otherFrames = 60;
int numFrames = inFrames + otherFrames + outFrames;
float t1 = inFrames * 1.0/numFrames;
@jeamland
jeamland / gist:11284662
Created April 25, 2014 10:20
Bluetooth LE on OS X via Python
import select
import socket
import sys
import objc
from PyObjCTools import AppHelper
objc.loadBundle("CoreBluetooth", globals(),
bundle_path=objc.pathForFramework(u'/System/Library/Frameworks/IOBluetooth.framework/Versions/A/Frameworks/CoreBluetooth.framework'))
@danielestevez
danielestevez / gist:2044589
Last active June 30, 2024 09:04
GIT Commit to an existing Tag
1) Create a branch with the tag
git branch {tagname}-branch {tagname}
git checkout {tagname}-branch
2) Include the fix manually if it's just a change ....
git add .
git ci -m "Fix included"
or cherry-pick the commit, whatever is easier
git cherry-pick {num_commit}
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real