Skip to content

Instantly share code, notes, and snippets.

View romreed's full-sized avatar
🏠
Working from home

Roman Sandu romreed

🏠
Working from home
View GitHub Profile
@romreed
romreed / preloader
Created December 4, 2015 10:03
preloader
.loader {
background: none repeat scroll 0 0 #ffffff;
bottom: 0;
height: 100%;
left: 0;
position: fixed;
right: 0;
top: 0;
width: 100%;
z-index: 9999;
@romreed
romreed / WordPress query_posts
Created February 17, 2016 09:46
WordPress query_posts
<?php if ( have_posts() ) : query_posts('p=1');
while (have_posts()) : the_post(); ?>
<?php the_title(); ?>
<?php the_content(); ?>
<?php the_post_thumbnail(array(100, 100)); ?>
<?php endwhile; endif; wp_reset_query(); ?>
@romreed
romreed / Ajax
Created March 12, 2016 08:36
Ajax
index.js
$('.Types').click(function(e) {
e.preventDefault();
/*var name = this.attr('name');
console.log(name);*/
$(this).addClass('active');
name=$('.active').attr('name');
$(this).removeClass('active');
@romreed
romreed / jQuery Accordeon
Created April 3, 2016 15:36
jQuery Accordeon
JS:
$(".accordeon dd").hide().prev().click(function() {
$(this).parents(".accordeon").find("dd").not(this).slideUp().prev().removeClass("active");
$(this).next().not(":visible").slideDown().prev().addClass("active");
});
CSS:
.accordeon .active { color: red }
HTML:
keybindings
switch input sourse['<Alt>Shift_L', '<Alt>Shift_R', '<Shift>Alt_L', '<Shift>Alt_R']
switch input sourse backward ['']
dconf
height: 400px;
background-repeat: no-repeat;
background-size: cover;
background-attachment: fixed;
background-position: center center;
@romreed
romreed / gist:bf6260a855f64ee8dc4682fc0ac4605c
Created April 30, 2016 06:13
Section bg color cycling
// Section bg color cycling
$('.animated-bg').each(function(){
var $this = $(this),
colors = ['#ec008c', '#00bcc3', '#5fb26a', '#fc7331'];
setInterval(function(){
var color = colors.shift();
colors.push(color);
$this.animate({backgroundColor: color}, 2000);
},4000);
<?php echo get_cat_name(3) ?>
<?php echo category_description(3) ?>
psql -U postgres -d postgres -1 -f /home/ftpMain/dump_last_2_simple.sql
gsutil -m cp -R gs://*/ D:/
gsutil -m cp -R D:\*\ gs://*
gsutil rsync D:\*m gs://*
gsutil -m cp -R D:\*\mms gs://*
chcp 65001