Skip to content

Instantly share code, notes, and snippets.

View veirus's full-sized avatar

Alex veirus

View GitHub Profile
@veirus
veirus / DROR4.py
Last active February 27, 2016 13:43 — forked from dansku/dropboxOrganize.py
Script to organize pictures uploaded from Mobile Devices to Dropbox's Camera Upload folder
#!/usr/bin/env python34
# dror4 - datetime format edition | 2016.02.27
# Based on https://gist.github.com/dansku/9040240#file-dropboxorganize-py
import os.path
import glob
from datetime import date
def move(files, newname):
# Move files
@veirus
veirus / select.styl
Last active December 5, 2016 14:52
Custom select in Stylus
.select
@extend .input
relative()
padding 0
margin-top 20px
appearance none
overflow hidden
// background-image: url("../img/arrow.png")
// background-repeat no-repeat
// background-position: 96% center
.input
background-color white
width 100%
height 48px
color clgreytxt
font-family: ff
font-size: 16px
line-height 16px
border none
padding 0 20px
.arrow
&__right, &__left
size(11px, 20px)
display inline-block
background url("../img/rarr.png") no-repeat
&:hover
background url("../img/rarr_h.png") no-repeat
&__left
transform scaleX(-1.0)
$image-path: '../img' !default
=bgi($name, $ext:'png', $repeat:false, $size:false)
@if($ext == svg)
background-image: url(#{$image-path}/#{$name}.png)
background-image: url(#{$image-path}/#{$name}.#{$ext})
@if not($repeat)
background-repeat: no-repeat
@if($size)
background-size: $size;
&__item
+rel
// Not so perverted vr:
// & + &
// border-left: 1px solid $grats-vr
// And warped one, behold:
& + &
&:before
content: ""
+abs
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; else : ?>
<p><?php _e( 'Sorry, no posts were found.' ); ?></p>
<?php endif; ?>
@veirus
veirus / wp_get_field.php
Last active January 18, 2017 11:44
for plugin advanced fields
<?php $images = get_field('images', 'options');
if( $images ): ?>
<?php foreach( $images as $image ): ?>
<a href="<?php echo $image['url']; ?>" class="fancyBox" rel="about">
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
</a>
<?php endforeach; ?>
<?php endif; ?>
<?php unset($image); ?>
@veirus
veirus / random_colorscheme.vim
Last active May 29, 2017 10:23
Set random colorscheme for yer Vim
function! SetRandomColors()
if !exists('g:mycolors')
let matches = {}
for fname in split(globpath(&runtimepath, 'colors/*.vim'), '\n')
let name = fnamemodify(fname, ':t:r')
let matches[name] = 1
endfor
let g:mycolors = sort(keys(matches), 1)
endif
exe 'colorscheme ' . g:mycolors[localtime() % len(g:mycolors)]
@veirus
veirus / Copy text directly from Photoshop text layer.
Created June 7, 2017 09:13 — forked from praveenvijayan/Copy text directly from Photoshop text layer.
Copy text directly from text layer. Works above photoshop cs6. Copy following script file into /Applications/Adobe Photoshop CC 2014/Presets/Scripts (MAC) or C:\Program Files\Adobe\Adobe Photoshop CC 2014\Presets\Scripts (WIN). Assign shortcut for easy access (cmd+option+c / ctrl+alt+c)
/*****************************************************************
*
* Copy Layer text 1.0 - by Praveen Vijayan! - http://www.decodize.com/
*
* Compatibility above Photoshop CS6
*
* Licensed under the Creative Commons Attribution 2.5 License - http://creativecommons.org/licenses/by/2.5/
*
*****************************************************************/