Skip to content

Instantly share code, notes, and snippets.

// Größe
int viewHeight = 800;
int viewWidth = 800;
// Initialisieren des CGContext nach Dokumentation
int bitmapBytesPerRow = (pixelsWide * 4);
int bitmapByteCount = (bitmapBytesPerRow * pixelsHigh);
CGColorSpaceRef colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
void *bitmapData = malloc( bitmapByteCount );
// Startpunkt
CGPoint start = CGPointMake(100, 100);
// Endpunkt
CGPoint end = CGPointMake(100, 200);
// Quartz den Beginn eines neuen Pfades (unserer Linie) signalisieren
CGContextBeginPath(context);
// Linienanfang setzen
CGContextMoveToPoint(context, start.x, start.y);
CGFloat width = 300;
CGFloat height = 400;
AIPNGController *pngController = [[AIPNGController alloc] init];
[pngController createBitmapContextWithWidth:width andHeight:height];
[pngController drawLineFrom:CGPointMake(10, 10)
to:CGPointMake(width - 10, 10)];
[pngController drawLineFrom:CGPointMake(width - 10, 10)
to:CGPointMake(width - 10, height * 2 / 3)];
@ChristianSch
ChristianSch / gist:9473458
Last active August 29, 2015 13:57
Weird activities at freenode.

##Users

  • wondeful (joined 22:37 GMT+1)
    • 193.106.31.74:8080 => proxy
    • http://www.stopforumspam.com/ipcheck/193.106.31.74 used for spam before
  • tefnyt (joined between 20:55 and 21:03 GMT+1)
    • 62.109.29.80:8080 => proxy
    • http://www.stopforumspam.com/ipcheck/62.109.29.80 used for spam before
  • gandbol (joined 20:50 GMT+1)
    • 78.24.223.33:8080 => proxy
  • http://www.stopforumspam.com/ipcheck/78.24.223.33
@ChristianSch
ChristianSch / fizzbuzz.js
Created July 3, 2014 05:50
Quick FizzBuzz in Javascript in under
for (var i = 1; i <= 100; i++) { if (((i % 3) === 0) && ((i % 3) === 0)) console.log("FizzBuzz"); else if ((i % 3) === 0) console.log("Fizz"); else if ((i % 5) === 0) console.log("Buzz"); else console.log(i); }
Verifying myself: My Bitcoin username is +christianschu. https://onename.io/christianschu
@ChristianSch
ChristianSch / Gruntfile.js
Created August 17, 2014 09:53
Gruntfile.js
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
paths: {
scss: './sass',
css: './public/css',
js: ['*.js', 'public/js/*.js', 'test/*.js'],
beautify: ['*.js', 'public/js/*.js', 'test/*.js', 'index.html', 'public/partials/**.html']
@ChristianSch
ChristianSch / keybase.md
Created September 17, 2014 21:22
keybase.md

Keybase proof

I hereby claim:

  • I am christiansch on github.
  • I am christiansch (https://keybase.io/christiansch) on keybase.
  • I have a public key whose fingerprint is 3CE3 BB45 434B 12C4 0383 337E 23CF 80C9 17DC EAD1

To claim this, I am signing this object:

$white: #fff;
// $green: #45a14d;
// $green-darkened: #377f3d;
// $green-lightened: #46b850;
$green: #3a8741;
$green-darkened: #2a612f;
$green-lightened: #45a14d;
// $red: #8f3d3d;
// $red-darkened: #7F3636;
// $red-lightened: #9C4242;
@ChristianSch
ChristianSch / pf.conf
Last active February 6, 2017 18:26
pf.conf for ovpn.to servers on osx
#
# Default PF configuration file.
#
# This file contains the main ruleset, which gets automatically loaded
# at startup. PF will not be automatically enabled, however. Instead,
# each component which utilizes PF is responsible for enabling and disabling
# PF via -E and -X as documented in pfctl(8). That will ensure that PF
# is disabled only when the last enable reference is released.
#
# Care must be taken to ensure that the main ruleset does not get flushed,