Skip to content

Instantly share code, notes, and snippets.

Alex veirus

View GitHub Profile
@veirus
veirus / DROR4.py
Last active Feb 27, 2016 — forked from dansku/dropboxOrganize.py
Script to organize pictures uploaded from Mobile Devices to Dropbox's Camera Upload folder
View DROR4.py
#!/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 Dec 5, 2016
Custom select in Stylus
View select.styl
.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
View input.styl
.input
background-color white
width 100%
height 48px
color clgreytxt
font-family: ff
font-size: 16px
line-height 16px
border none
padding 0 20px
View slider_arrows.styl
.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)
View =background-image.sass
$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;
View Perverted divider of the Slaanesh.sass
&__item
+rel
// Not so perverted vr:
// & + &
// border-left: 1px solid $grats-vr
// And warped one, behold:
& + &
&:before
content: ""
+abs
View wordpress display posts
<?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 Jan 18, 2017
for plugin advanced fields
View wp_get_field.php
<?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
Set random colorscheme for yer Vim
View random_colorscheme.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. 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)
View Copy text directly from Photoshop text layer.
/*****************************************************************
*
* 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/
*
*****************************************************************/
You can’t perform that action at this time.