Skip to content

Instantly share code, notes, and snippets.

View pichfl's full-sized avatar
👨‍🎨
No mistakes, only happy accidents.

Florian Pichler pichfl

👨‍🎨
No mistakes, only happy accidents.
View GitHub Profile
@pichfl
pichfl / pichfl.zshtheme
Last active December 20, 2015 01:19
My personal zsh theme for oh my zsh
# This theme is a small multiline modification of the fantastic robbyrussell.zsh-theme.
# Fix rendering errors when using multibyte characters
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
prompt_context() {
local user=`whoami`
if [[ -n "$SSH_CLIENT" ]]; then
echo "%{$fg_bold[blue]%}%n$fg_bold[red]%}@%m%{$reset_color%}"
@pichfl
pichfl / timetracking.js
Created March 3, 2014 14:30
timetracking-ticker
'use strict';
// Get global namespace
var SP = window.SP || {};
(function($) {
var target = $('#working-time-count');
var appointmentStartTime = SP.APPOINTMENT_START_TIME;
@pichfl
pichfl / README
Created April 13, 2014 11:41
A Gulp config with a live reloading and watching preview server which compiles and prefixes SCSS, concatenates JavaScript, copies HTML into one place
## File Structure
|
+-- build - will contain the result
|
+-- source
| |
| +-- components - bower components (remember to configure this in .bower_rc)
| +-- css - scss source files
| +-- js - js source files - will be added in alphabetical order
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am pichfl on github.
  • I am fp (https://keybase.io/fp) on keybase.
  • I have a public key whose fingerprint is 32B6 6D2D EE95 9B3C C642 4935 2E42 53D7 E676 0412

To claim this, I am signing this object:

paginationPages: computed('page', 'totalPages', function() {
var page = this.get('page');
var totalPages = this.get('totalPages');
var pages = [];
var i = Math.max(0, page - pagesRange);
var max = Math.min(totalPages, page + pagesRange);
for (i; i < max; i++) {
pages.push(i+1);
}
Verifying that +pichfl is my openname (Bitcoin username). https://onename.io/pichfl
@pichfl
pichfl / gulpfile.js
Created March 2, 2015 12:55
Static site generator Gulpfile with Sass, Browserify and LiveReload
'use strict';
var argv = require('minimist')(process.argv.slice(2));
var browserify = require('browserify');
var browserSync = require('browser-sync');
var buffer = require('vinyl-buffer');
var frontmatter = require('front-matter');
var gulp = require('gulp');
// var path = require('path');
var source = require('vinyl-source-stream');
@pichfl
pichfl / timemachinebackup.sh
Last active August 29, 2015 14:16
A small script to mount a volume, make a TimeMachine backup, wait for it to finish and unmount the volume again. Please adjust to your needs.
#!/bin/sh
# ------------------------------------------------------
# A small script to mount a volume, make a TimeMachine
# backup, wait for it to finish and unmount
# the volume again. Please adjust to your needs.
# ------------------------------------------------------
# Mount the backup volume, adjust to your needs
#diskutil mount …
mkdir -p ~/.ssh && echo "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0XXw4TcD9jAtxV1yPdF6jvdoRwM71lTmXcqUlGW2JuuwMtJH0u+qkxwNzdkfbDuBgd3dHv/a1JFSGNY15YEx1M4WhQqyL32uDgEGEUWXaA2fxzjO6bhmT9laZgvdwK+fLuBC0ppPe5ttZRZtKL2eUzKJq5IrnSA/D1SnOSJJvI49AoWTeTxmmqpGoYcZLrgnnrIJYRbKscA+xtf50HTmnDswtw+tVQNVJCIjJEyblLeglAoydLWsGdGWEtqHvJqVA5xQrhlMwCCXLwpsOtc/fpCoTbGFBRtPE2lCTorupX9TlUh8RJSKqgiv22I9PBEZTFSZ7KnkWiFkeLv6MXPxfQ== Florian Pichler <fp@ylk.gd>" >> ~/.ssh/authorized_keys