Skip to content

Instantly share code, notes, and snippets.

@lvivski
lvivski / cicada.css
Created December 1, 2011 20:33 — forked from Zoramite/cicada.css
Cicada + CSS Backgrounds
.example1 {
background-color: #efefef;
background-image:
-webkit-linear-gradient(0, rgba(222,213,108,.07) 50%, transparent 50%),
-webkit-linear-gradient(0, rgba(201,184,88,.13) 50%, transparent 50%),
-webkit-linear-gradient(0, transparent 50%, rgba(168,137,73,.17) 50%),
-webkit-linear-gradient(0, transparent 50%, rgba(99,78,60,.19) 50%);
background-image:
-moz-linear-gradient(0, rgba(222,213,108,.07) 50%, transparent 50%),
-moz-linear-gradient(0, transparent 50%, rgba(201,184,88,.13) 50%),
@lvivski
lvivski / hack.sh
Created March 31, 2012 18:36 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@lvivski
lvivski / Queue.js
Created June 1, 2012 17:02 — forked from WebReflection/Queue.js
All you need to manage queues
function Queue(q) {"use strict";
// (C) WebReflection - Mit Style License
var
next = function next() {
return (callback = q.shift()) ? !!callback(q) || !0 : !1;
},
callback
;
(q.wait = function wait(condition, delay) {
condition || callback && q.unshift(callback);
@lvivski
lvivski / uri.js
Created September 6, 2012 08:28 — forked from jlong/uri.js
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@lvivski
lvivski / css-stats-ack.sh
Created October 7, 2012 09:09 — forked from pjkix/css-stats-ack.sh
shell script to generate some css file statistics
#!/bin/bash
## v1.0.6
## this script will gernerate css stats
### example output
# CSS STATS
# ----------
# Floats: 132
@lvivski
lvivski / LICENSE.txt
Last active December 16, 2015 14:59 — forked from 140bytes/LICENSE.txt
сurry.js for 140byt.es
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2013 Yehor Lvivski <lvivski@gmail.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@lvivski
lvivski / dabblet.css
Created July 20, 2013 23:36 — forked from LeaVerou/dabblet.css
Loading animation like the one seen on http://www.freeger.com/projects/contextad/ with CSS
/**
* Loading animation like the one seen on http://www.freeger.com/projects/contextad/ with CSS
* Caveat: Not DRY. The content needs to be repeated in a data- attribute (or directly in the CSS).
*/
body {
background: #ccc51c;
min-height: 100%;
}
@lvivski
lvivski / pr.md
Created August 29, 2013 18:52 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@lvivski
lvivski / yubikey-reset.sh
Created May 22, 2020 18:56 — forked from pkirkovsky/yubikey-reset.sh
Utility for resetting a Yubikey to factory defaults using gpg-connect-agent. This will wipe out any stored keys and reset PINs to default values.
gpg-connect-agent <<EOF
/hex
scd serialno
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40