Skip to content

Instantly share code, notes, and snippets.

View yetti's full-sized avatar
🔌
Unplugged

Yetrina Battad yetti

🔌
Unplugged
View GitHub Profile
@yetti
yetti / prompt_yetti_setup
Created February 5, 2014 14:34
Prezto prompt config
#
# Based on zsh-powerline and paradox
# * Time and Ruby version shown on the right
# * Git branch info on the left
# * Single line prompt
#
# Authors:
# Yetrina Battad <hello@yetti.io>
ZSH_THEME_REP_TIME_SINCE_COMMIT_SHORT="%{$fg[green]%}"
#!/bin/bash
#title :wildfly-install.sh
#description :The script to install Wildfly 8.x
#more :http://sukharevd.net/wildfly-8-installation.html
#author :Dmitriy Sukharev
#date :20140312
#usage :/bin/bash wildfly-install.sh
WILDFLY_VERSION=8.0.0.Final
WILDFLY_FILENAME=wildfly-$WILDFLY_VERSION
@yetti
yetti / gnomoria_seeds
Last active August 29, 2015 14:11
Seeds for Gnomoria
The Leafy Artifact - 3843548
The Unkempt Harvest - 1967601228
The Crazed Work - 2404983463 (?)
The Headless Tulip - 2004341057
The Hip Hawk - 2004341046
xIlP0L9xxy51aUDX6lP8Sh6uaugCPjbhzSy9Zlbl
@yetti
yetti / Array-rotate
Created July 21, 2015 21:16
JS array rotate
http://stackoverflow.com/q/1985260
//echo $imagefullpath;
$img = ImageCreateFromJPEG($imagefullpath);
$canvas = imagecreatetruecolor($thumb_w,$thumb_h);
// following image calculation based on
// http://return-true.com/2009/02/making-cropping-thumbnails-square-using-php-gd/
$orig_w = imagesx($img);
$orig_h = imagesy($img);
$w_ratio = ($thumb_w / $orig_w);
$h_ratio = ($thumb_h / $orig_h);
if ($orig_w > $orig_h) { // horizontal image
@yetti
yetti / gist:4156394
Created November 27, 2012 19:21
RegEx to select "a href" from HTML
a\s*(?i)href\s*=\s*(\"([^"]*\")|'[^']*'|([^'">\s]+))
@yetti
yetti / content.css
Created December 3, 2012 08:23
css fixes
.content {
background: #EFEEEA url(../img/body-bg.png) repeat-y 0 0;
background-size: 100%;
padding: 100px 24px 120px;
margin: 0 0 -30px;
}
@yetti
yetti / computed.css
Last active December 13, 2015 18:39
computed css
border-collapse: collapse;
color: rgb(0, 0, 0);
display: block;
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
font-weight: bold;
height: 18px;
line-height: 17px;
margin-bottom: 0px;
margin-left: 0px;
@yetti
yetti / aether_lead-in_block.rb
Created March 20, 2013 13:18
Provides a {% lead %} block to define lead-in text. Adds text inside block to post data's 'lead' field and wraps text inside a paragraph with a style class for customisation.
# Title: Lead-in Text Block
# Author: Yetrina Battad (http://aether.nu)
# Description: Provides a block for lead-in text. Inspired by this plugin: http://blog.darkrefraction.com/2012/jekyll-excerpt-plugin.html
#
# Captures the text between the 'lead' block and places it in the post data's 'lead' property.
# Also wraps the text between the 'lead' tags into a paragraph with CSS hook for styling.
#
# Usage:
# {% lead %}
# Wheeee!