Skip to content

Instantly share code, notes, and snippets.

View sitnin's full-sized avatar

Gregory Sitnin sitnin

View GitHub Profile
@jlxw
jlxw / index.html
Created October 7, 2016 02:51
Parsley 2.5 and Bootstrap 4
<script src='https://cdnjs.cloudflare.com/ajax/libs/parsley.js/2.5.0/parsley.min.js'></script>
<script>
Parsley.options.errorClass = 'has-danger'
Parsley.options.successClass = 'has-success'
Parsley.options.classHandler = function(f) { return f.$element.closest('.form-group'); }
Parsley.options.errorsWrapper = '<div class="form-control-feedback"></div>'
Parsley.options.errorTemplate = '<div></div>'
</script>
@dolphin278
dolphin278 / index.js
Last active December 27, 2015 08:19
Использование hyperspace и hyperstream для генерации html.
var es = require('event-stream');
var fs = require('fs');
var hyperspace = require('hyperspace');
var hyperstream = require('hyperstream');
var itemTemplate = fs.readFileSync('./views/item.html');
/*
<div class="item">
<div class="title">Заголовок</div>
<div class="description">Текст записи</div>
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

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:

@johntyree
johntyree / getBlockLists.sh
Last active March 9, 2024 12:32
Make one large blocklist from the bluetack lists on iblocklist.com
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'