Skip to content

Instantly share code, notes, and snippets.

@reinislejnieks
reinislejnieks / gist:2133996
Last active June 13, 2017 09:22
html starting template #html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>HTML5 template</title>
<meta name="" content="">
<meta name="author" content="Reinis Lejnieks">
<link rel="stylesheet" href="css/styles.css">
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@reinislejnieks
reinislejnieks / gist:2134545
Created March 20, 2012 12:15
jQuery : various
/* include jQuery */
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<script src="http://cdn.jquerytools.org/1.2.5/jquery.tools.min.js"></script>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
/*--------------------------------*/
jQuery(document).ready(function($){
$('').addClass("");
});
/*--------------------------------*/
$(document).ready(function(){
@reinislejnieks
reinislejnieks / gist:2134565
Last active June 13, 2017 09:22
git reference #git
git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
git init // on directory starts to track files inside
git clone clone git://github.com/h5bp/html5-boilerplate.git mapesvards
git status
git add <filename/directory>
git commit
git commit -m "user authentication code added"
git commit -a // automatically stage every file that is already tracked before doing the commit, letting you skip the git add part
git rm <file> // deletes and stops tracking
@reinislejnieks
reinislejnieks / gist:2134603
Created March 20, 2012 12:23
css : media query reporter
/* ======================================
CSS3 Media Query Reporter
v. 1.0.1
by David Cochran - aLittleCode.com
========================================= */
body:after {
content: "less than 320px";
@reinislejnieks
reinislejnieks / gist:2158961
Created March 22, 2012 15:17
Google Fonts use example - Helvetica like
<link href="http://fonts.googleapis.com/css?family=Anonymous+Pro:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css" >
<style>
.helv {font:14px 'Anonymous Pro', serif;}
</style>
<p class="helv">I'm almost cool like helvetica.</p>
<p>I'am normal Arial shit.</p>
<a href="http://www.webdesignshock.com/helvetica-free-download" target=_blank>http://www.webdesignshock.com/helvetica-free-download</a> - tady doporučují, které fonty použít, které vypadají nejvíce Helvetica-like. Myslm, že tenhle je v cajku, ale klidně čekni další.
@reinislejnieks
reinislejnieks / README.markdown
Created April 3, 2012 12:19 — forked from marijn/README.markdown
List of nationalities in YAML, CSV and TXT format

List of nationalities

It's time someone compiled a list of nationalities to use within a web application. This gist attempts to make a first move at that.

##List of countries

I've also compiled a list of countries

@reinislejnieks
reinislejnieks / README.markdown
Last active July 6, 2017 09:15 — forked from marijn/README.markdown
List of countries in YAML, CSV and TXT format

#List of countries

It's time someone compiled a list of countries to use within a web application. This gist attempts to make a first move at that.

List of nationalities

I've also compiled a list of nationalities

<?php
$arr = array('key' => 'value', 'key' => $value);
$arr2 = array(array('key' => 'value', 'key'),array('key' => 'value', 'key' => ''),array('key' => 'value', 'key'));
$arr3 = array('key' => array('one' => 'two', 'three' => 'four'), array('foo' => 'bar', 'condition' => false));
$arr4 = array();
$arr4[] = 'key' => 'value', 'foo' => 'bar';
@reinislejnieks
reinislejnieks / snippet.js
Last active June 13, 2017 10:01
JavaScript useful #js #starred
// return left if left is not false otherwise return right
'reinis' || null
// 'reinis'
// returns left if left is not true otherwise return right
0 && null
// 0
!0
// true
@reinislejnieks
reinislejnieks / gist:2891269
Created June 7, 2012 20:08
useful WP things
<?php
wp_enqueue_script('jquery'); /*in header.php before wp_head();*/
/*--------------------------------*/
/* for wp */
wp_deregister_script('jquery');
wp_register_script('jquery',("http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"),false,'1.6.2');
wp_enqueue_script('jquery');
/*--------------------------------*/
bloginfo('template_directory');
/*--------------------------------*/