Skip to content

Instantly share code, notes, and snippets.

Avatar
💸
0x90

kyb kybernetyk

💸
0x90
View GitHub Profile
View gist:ca06a392a860c8283eddb6db551d4b45
### Keybase proof
I hereby claim:
* I am kybernetyk on github.
* I am kyb (https://keybase.io/kyb) on keybase.
* I have a public key whose fingerprint is CFED 0008 2108 D55F BFD9 BBC0 9306 9B9C 9A63 0DD5
To claim this, I am signing this object:
View patch-edid.rb
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
View htacces
ModPagespeed on
ModPagespeedRewriteLevel CoreFilters
ModPagespeedEnableFilters make_google_analytics_async
ModPagespeedEnableFilters extend_cache
ModPagespeedEnableFilters rewrite_css
ModPagespeedEnableFilters combine_css
ModPagespeedEnableFilters combine_javascript
ModPagespeedEnableFilters defer_javascript
ModPagespeedEnableFilters collapse_whitespace
ModPagespeedEnableFilters flatten_css_imports
View gist:67ae30bf6bd9a9c1e3e872c6293866fe
Verifying that +kybernetyk is my blockchain ID. https://onename.com/kybernetyk
View std::optional is love
//compile with:
// clang++ -std=c++1y -stdlib=libc++ optional.cpp
#include <experimental/optional>
#include <string>
#include <cstdio>
std::experimental::optional<std::string> get_fancy_shit() {
//return std::string("some fancy shit!");
return std::experimental::nullopt;
View std::optional ist liebe
/compile with:
// clang++ -std=c++1y -stdlib=libc++ optional.cpp
#include <experimental/optional>
#include <string>
#include <cstdio>
std::experimental::optional<std::string> get_fancy_shit() {
//return std::string("some fancy shit!");
return std::experimental::nullopt;
View graustufenholokaust.mm
NSBitmapImageRep* imageRep = [[NSBitmapImageRep alloc] initWithData:[img TIFFRepresentation]];
int x = [imageRep size].width - 300;
int y = 170;
float avg = 0.0;
float totalcnt = 0;
for (int _y = y; _y < y + 120; _y++) {
for (int _x = x; _x < x + 270; _x++) {
NSColor* color = [imageRep colorAtX: (_x) y: ([imageRep size].height - _y)];
@kybernetyk
kybernetyk / blah.m
Created May 8, 2012
non ca animation
View blah.m
#ifdef ULTRAL33T_ANIM_OPTIMIZED
NSString *selectionDirection = [userInfo objectForKey: @"direction"];
NSString *outDirection = @"left";
NSString *inDirection = @"right";
NSWindowOrderingMode winpos = NSWindowAbove;
if ([selectionDirection isEqualToString: @"up"]) {
outDirection = @"right";
inDirection = @"left";
@kybernetyk
kybernetyk / explode.cc
Created Apr 10, 2012
how to make apple clang (xcode 4.3.2) explode:
View explode.cc
int main(int argc, char const* argv[]) {
[](){}();
return 0;
}
View Makefile
CC=go tool 6g
LL=go tool 6l
LIBS=
LNAME=smsdemon.6
CFLAGS=-o $(LNAME) -p smsdemon
EXECNAME=smsdemon
.PHONY: all
all: smsdemon
You can’t perform that action at this time.