Skip to content

Instantly share code, notes, and snippets.

View lnpbk's full-sized avatar

Leon Bienek lnpbk

View GitHub Profile
@lnpbk
lnpbk / my.cnf
Created January 19, 2016 17:32
Craft 2.X workaround for MySQL version > 5.7.5
[mysqld]
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
@lnpbk
lnpbk / reserved_subdomains.php
Created July 23, 2015 18:35
Handy list of subs u will want to keep from being registered
<?php
$reserved = [
'api',
'help',
'docs',
'www',
'account',
'app',
'demo',
@lnpbk
lnpbk / gist:9249957
Last active August 29, 2015 13:56
My Caret in Atom
/*
* Go to Settings > Themes > your stylesheet
*/
.editor {
// Slow the blinking of the cursor
.cursor {
line-height: @line-height;
// This is for a teminal style block cursor, only any good for dark color schemes
@lnpbk
lnpbk / gist:9249512
Created February 27, 2014 12:56
Change line-height in atom editor
/*
* Go to Settings > Themes > your stylesheet, and add the following
*/
@line-height: 2em;
.tree-view {
}
<!doctype html>
<html>
<head>
<!-- Run in full-screen mode. -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- Make the status bar black with white text. -->
<meta name="apple-mobile-web-app-status-bar-style" content="black">
@lnpbk
lnpbk / gist:9089160
Last active August 29, 2015 13:56
Post receive hook v0.1
#!/bin/sh
USERNAME="user";
GROUPNAME="www-data";
WORKDIR="/path/to/git/root";
# Checkout the latest commit
GIT_WORK_TREE=${WORKDIR} git checkout -f
# Set file owner
@lnpbk
lnpbk / dstwo
Last active August 29, 2015 13:56
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg_bold[cyan]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}%{$fg_bold[cyan]%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!"
ZSH_THEME_GIT_PROMPT_CLEAN=""
function prompt_char {
if [ $UID -eq 0 ]; then echo "%{$fg[red]%}#%{$reset_color%}"; else echo $; fi
}
PROMPT='%(?, ,%{$fg[red]%}FAIL%{$reset_color%}
@lnpbk
lnpbk / Preferences.sublime-settings
Last active January 4, 2016 19:09
My sublime settings
{
"bold_folder_labels": true,
"color_scheme": "Packages/Theme - Spacegray/base16-eighties.dark.tmTheme",
"drag_text": false,
"ensure_newline_at_eof_on_save": true,
"font_face": "Source Code Pro",
"font_size": 13,
"ignored_packages":
[
"Vintage"
@lnpbk
lnpbk / gist:8519248
Created January 20, 2014 12:38
Vertically align anything. SCSS Placeholder. Source: http://zerosixthree.se/vertical-align-anything-with-just-3-lines-of-css/
%vertical-align {
position: relative;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
.element p {
@extend %vertical-align;
@lnpbk
lnpbk / opacity.scss
Last active December 28, 2015 07:29 — forked from jgv/opacity.scss
@mixin hp-opacity($trans) {
filter: alpha(opacity=($trans * 100));
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=#{$trans * 100})";
-moz-opacity: $trans;
-khtml-opacity: $trans;
opacity: $trans;
}