This file contains hidden or 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
#include <stdio.h> | |
int main(int argc, char **argv) | |
{ | |
//lul, wie ich auf sowas reingefallen bin: ich erwartete dass | |
//der ptr um (2*4) byte inkrementiert wird. aber nein, dies | |
//war ein moismus. denn der pointer wird um (2*4)*sizeof(float) | |
//inkrementiert. | |
//*lach* keine skriptsprachen mehr fuer mich ... und keine | |
//typed pointer mehr. nur noch void und char! |
This file contains hidden or 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
howto git fuer doff | |
neues repository: | |
git init | |
datei zufuegen: | |
git add <dateiname> | |
aenderungen commiten: | |
git commit -m irgend ein commit comment |
This file contains hidden or 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
#include <stdio.h> | |
#include <memory> | |
#include "lipido.h" | |
lipido::WebResponse test_handler(lipido::WebContext &context) { | |
lipido::WebResponse resp; | |
resp.body = "LOL ICH MACH DICH PLATT!"; | |
return resp; | |
} |
This file contains hidden or 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
- (IBAction) buttonOneClick:(id)sender { | |
NSRect frm = [button2 frame]; | |
frm.origin.x += 150; | |
#if 1 | |
[NSAnimationContext beginGrouping]; | |
[[NSAnimationContext currentContext] setDuration: 5.0]; | |
[[NSAnimationContext currentContext] setTimingFunction: [CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionEaseOut]]; | |
[button2.animator setFrame: frm]; | |
This file contains hidden or 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/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
This file contains hidden or 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
CC=go tool 6g | |
LL=go tool 6l | |
LIBS= | |
LNAME=smsdemon.6 | |
CFLAGS=-o $(LNAME) -p smsdemon | |
EXECNAME=smsdemon | |
.PHONY: all | |
all: smsdemon |
This file contains hidden or 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
int main(int argc, char const* argv[]) { | |
[](){}(); | |
return 0; | |
} |
This file contains hidden or 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"; |
This file contains hidden or 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 hidden or 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; |