This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import CoreGraphics | |
func getPointOnCurve(path: CGPath, t: CGFloat) -> CGPoint? { | |
// Scale the curve to the unit interval | |
var transform = CGAffineTransform(scaleX: 1, y: 1) | |
let bounds = path.boundingBoxOfPath | |
transform = transform.scaledBy(x: 1 / bounds.width, y: 1 / bounds.height) | |
transform = transform.translatedBy(x: -bounds.minX, y: -bounds.minY) | |
guard let scaledPath = path.copy(using: &transform) else { | |
return nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// PowerFinder.swift | |
// powerfinder | |
// | |
// Created by jls on 16.06.24. | |
// | |
import Foundation | |
import Cocoa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that +kybernetyk is my blockchain ID. https://onename.com/kybernetyk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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"; |
NewerOlder