Skip to content

Instantly share code, notes, and snippets.

View viktor-evdokimov's full-sized avatar
👷‍♂️
Focusing

Viktor Evdokimov viktor-evdokimov

👷‍♂️
Focusing
View GitHub Profile
@viktor-evdokimov
viktor-evdokimov / css_resources.md
Last active August 29, 2015 14:14 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@viktor-evdokimov
viktor-evdokimov / datauri.html
Created February 11, 2015 21:50
smallest data uri
<img title="" alt="" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" />
@viktor-evdokimov
viktor-evdokimov / index.html
Created February 26, 2015 20:12
force IE11 to behave as IE10
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE10">
@viktor-evdokimov
viktor-evdokimov / jpath.js
Last active August 29, 2015 14:16
Tiny javascript path accessor
function jpath_(o, props) {
if (!o) return o;
if (props.length == 1)
return o[props[0]]
return jpath_(o[props.shift()], props)
}
function jpath(o, path) {
if (!path) return o
return jpath_(o, path.split('.'))
}
@viktor-evdokimov
viktor-evdokimov / parser.py
Created March 20, 2015 04:21
parse string expression and create custom sql alchemy filter from it
from flask import request
class Parser(object):
sep = ';'
# ...
def filter_query(self, query):
model_class = self._get_model_class(query) # returns the query's Model
@viktor-evdokimov
viktor-evdokimov / run.bat
Created March 24, 2015 14:06
Run SSMS under another user
runas /netonly /user:domain\username "C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe"
@viktor-evdokimov
viktor-evdokimov / style.css
Created March 25, 2015 02:54
Remove border rounding in os x etc
.select{
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
-webkit-border-radius: 0; /* Safari 3-4, iOS 1-3.2, Android 1.6- */
-moz-border-radius: 0; /* Firefox 1-3.6 */
border-radius: 0; /* Opera 10.5, IE 9, Safari 5, Chrome, Firefox 4, iOS 4, Android 2.1+ */
}

Developer Cheat Sheets

This are my cheat sheets that I have compiled over the years. Tired of searching Google for the same things, I started adding the information here. As time went on, this list has grown. I use this almost everyday and this Gist is the first bookmark on my list for quick and easy access.

I recommend that you compile your own list of cheat sheets as typing out the commands has been super helpful in allowing me to retain the information longer.

// format an ISO date using Moment.js
// http://momentjs.com/
// moment syntax example: moment(Date("2011-07-18T15:50:52")).format("MMMM YYYY")
// usage: {{dateFormat creation_date format="MMMM YYYY"}}
Handlebars.registerHelper('dateFormat', function(context, block) {
if (window.moment) {
var f = block.hash.format || "MMM DD, YYYY hh:mm:ss A";
return moment(context).format(f); //had to remove Date(context)
}else{
return context; // moment plugin not available. return data as is.
@viktor-evdokimov
viktor-evdokimov / lxml.sh
Created April 14, 2015 16:32
install lxml on ubuntu 14.04
apt-get install libxml2-dev libxslt-dev python-dev zlib1g-dev