Skip to content

Instantly share code, notes, and snippets.

View pvinis's full-sized avatar
🔭
hello?

Pavlos Vinieratos pvinis

🔭
hello?
View GitHub Profile
brew update && brew upgrade
if ([direction isEqualToString:kIKBSnapToLineMinX]) {
switch (flipped) {
case kIKBSizeTransformFlippedXAxis:
case kIKBSizeTransformFlippedBothAxis:
if (keepProportions) {
switch (handle) {
case kIKBTransformLayerHandleMiddleRight:
snapRect.origin.x = 0;
snapRect.origin.y = change / 2 / aspectRatio;
if ([direction isEqualToString:kIKBSnapToLineMinX]) {
switch (flipped) {
case kIKBSizeTransformFlippedXAxis:
case kIKBSizeTransformFlippedBothAxis:
if (keepProportions) {
switch (handle) {
case kIKBTransformLayerHandleMiddleRight:
snapRect.origin.x = 0;
snapRect.origin.y = change / 2 / aspectRatio;
" gist
let g:gist_clip_command='pbcopy'
let g:gist_detect_filetype=1
let g:gist_open_browser_after_post=1
//
// GridDemoViewController.m
// JNWCollectionViewDemo
//
// Created by Jonathan Willing on 4/15/13.
// Copyright (c) 2013 AppJon. All rights reserved.
//
#import "GridDemoViewController.h"
#import "GridCell.h"
@pvinis
pvinis / gist:f93b2e1c04664e78c493
Created May 15, 2015 08:42
opencl-device-detect
#include <stdio.h>
#include <stdlib.h>
#include <OpenCL/opencl.h>
int main(int argc, char* const argv[]) {
cl_uint num_devices, i;
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, 0, NULL, &num_devices);
cl_device_id* devices = calloc(sizeof(cl_device_id), num_devices);
#![feature(associated_types)]
extern crate time;
fn main() {
println!("hello :)");
//println!("{}", time::now());
}
@pvinis
pvinis / gist:7840124
Created December 7, 2013 11:38
shell
func (sh *Shell) Loop() {
sc := bufio.NewScanner(os.Stdin)
printPrompt()
for sc.Scan() {
line := sc.Text()
if line == "start" || line == "st" {
sh.startStop <- true
} else if line == "stop" {
sh.startStop <- false
} else if line == "exit" {
package stringcase
import "testing"
func equal(a, b []string) bool {
if len(a) != len(b) {
return false
}
for i, v := range a {
if v != b[i] {
@pvinis
pvinis / cyberpunk.el
Created March 14, 2013 13:07
emacs themes i want for vim
;; Cyberpunk Colour Theme
;;
;; "and he'd still see the matrix in his sleep, bright lattices of logic
;; unfolding across that colorless void..."
;; William Gibson, Neuromancer.
;;
(require 'color-theme)
;;;###autoload