Skip to content

Instantly share code, notes, and snippets.

Janek Lasocki-Biczysko janeklb

Block or report user

Report or block janeklb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@janeklb
janeklb / .bash_profile
Created Aug 3, 2017 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
View .bash_profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@janeklb
janeklb / install_unoconv_0.7.sh
Created Jul 27, 2016
install unoconv 0.7 on debian jessie
View install_unoconv_0.7.sh
# Add unstable repo to sources.list
# meaning, add the following lines (and uncomment) to /etc/apt/sources.list:
# deb http://http.us.debian.org/debian unstable main non-free contrib
# deb-src http://http.us.debian.org/debian unstable main non-free contrib
gpg --export --armor 8514CC63 | apt-key add - && apt update # might not be needed
apt-get build-dep unoconv
cd /usr/src
@janeklb
janeklb / WroWriter.java
Last active Dec 28, 2015
Attempting to programatically write a Wro4j resource group to a file
View WroWriter.java
package com.intrallect.amauthor.wro4j;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import javax.annotation.PostConstruct;
import javax.servlet.FilterConfig;
@janeklb
janeklb / deploy.sh
Last active Dec 24, 2015
Easy peezy deploy from a git repo using rsync
View deploy.sh
#!/bin/sh
# heavily inspired by http://wildlyinaccurate.com/deploying-a-git-repository-to-a-remote-server (and comments)
ref=master # git ref
prefix=deploy_in_prog/ # just a temp name
tmp_dir=/tmp
remote_dir=/var/www # the remote directory
remote_host=user@host # the remote host
@janeklb
janeklb / gist:5546011
Last active Dec 17, 2015
AngularJS '&' directive scope - 2
View gist:5546011
<div ng-app="myApp" ng-controller="myController">
<div my-clicky my-click-action="doStuff(number)"></div>
</div>
@janeklb
janeklb / gist:5544464
Last active Dec 17, 2015
AngularJS '&' directive scope - 1
View gist:5544464
<div ng-app="myApp" ng-controller="myController">
<div my-clicky my-click-action="doStuff()"></div>
</div>
@janeklb
janeklb / gist:4761535
Last active Jun 1, 2018
PHP: array to object
View gist:4761535
<?php
# Simple loop copy
function loop_copy($array) {
$object = new stdClass();
foreach ($array as $key => $value) {
$object->$key = $value;
}
}
@janeklb
janeklb / gist:4650320
Created Jan 27, 2013
create javascript date objects using date strings, in the user's timezone
View gist:4650320
function dateInLocalTimezone(simpleDateString) {
var date = new Date(simpleDateString), millis = date.getTime();
date.setTime(millis + date.getTimezoneOffset() * 60 * 1000);
return date;
}
@janeklb
janeklb / gist:2761327
Created May 21, 2012
Bootstrap (v2.0.3) tooltip issue
View gist:2761327
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="http://twitter.github.com/bootstrap/assets/css/bootstrap-responsive.css" />
</head>
<body style="padding: 60px 0;">
<div style="float:right;">
<a class="btn tt" title="Yaaaaaaaaaaay, this longer tooltip works.. kinda">:)</a>
<a class="btn tt" title="Boooooooooooo, this longer tooltip is broken..">:(</a>
You can’t perform that action at this time.