Skip to content

Instantly share code, notes, and snippets.

View hjanuschka's full-sized avatar
🤖
-.-

Helmut Januschka hjanuschka

🤖
-.-
  • Vienna/Austria
View GitHub Profile
<?php
class ColorCLI {
static $foreground_colors = array(
'bold' => '1', 'dim' => '2',
'black' => '0;30', 'dark_gray' => '1;30',
'blue' => '0;34', 'light_blue' => '1;34',
'green' => '0;32', 'light_green' => '1;32',
'cyan' => '0;36', 'light_cyan' => '1;36',
https://docs.google.com/presentation/d/1oRiquVfkibbkyTDCXIiMe_U6n0cezY_QL1VV3M52rOU/edit#slide=id.p
#OSX DIFF TOOL
#DOWNLOAD: http://www.perforce.com/downloads/20-User?qt-perforce_downloads_step_3=1#product-10
~/.giconfig
[merge]
keepBackup = false
tool = custom
[mergetool "custom"]
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge "$PWD/$BASE" "$PWD/$REMOTE" "$PWD/$LOCAL" "$PWD/$MERGED"
keepTemporaries = false
@hjanuschka
hjanuschka / shipitfile.js
Created January 27, 2015 09:44
shipit bartlby-core
module.exports = function (shipit) {
require('shipit-deploy')(shipit);
shipit.initConfig({
default: {
workspace: '/tmp/shipit/bartlby-core',
deployTo: '/tmp/shipit/bartlby-core',
repositoryUrl: 'https://github.com/Bartlby/bartlby-core.git',
ignores: ['.git', 'node_modules'],
<?
$res = bartlby_new("/opt/bartlby/etc/bartlby.cfg");
include "config.php";
include "bartlby-ui.class.php";
$btl=new BartlbyUi($Bartlby_CONF, false);
@hjanuschka
hjanuschka / 0_reuse_code.js
Last active August 29, 2015 14:20
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@hjanuschka
hjanuschka / dns-proxy
Created July 1, 2015 06:21
dns-proxy startup script
#!/bin/sh
export NODE_PATH=$NODE_PATH:/usr/local/lib/node_modules
case "$1" in
start)
exec forever --sourceDir=/usr/lib/node_modules/dns-proxy -p /var/run/forever start dns-proxy.js
;;
stop)
#import <MWPhotoBrowser/MWCaptionView.h>
#import "MWCaptionView.h"
@interface HJ_MWCaption : MWCaptionView {
MWPhoto *_photo;
}
@property(nonatomic, strong) UIButton * like_button;
Add View on top
FameLayout rootLayout = (FrameLayout)findViewById(android.R.id.content);
View.inflate(this, R.layout.overlay_layout, rootLayout);
Then when you want to remove it:
FrameLayout rootLayout = (FrameLayout)findViewById(android.R.id.content); rootLayout.removeViewAt(rootLayout.getChildCount()-1);
#include <stdio.h>
#define MY_TRUE 0
#define MY_FALSE -1
#define MAX_NUM 20
int num_is_dividable(int num);
int main(int argc, char ** argv) {