Skip to content

Instantly share code, notes, and snippets.

View 4db's full-sized avatar

Alex Dubinchyk 4db

View GitHub Profile
@4db
4db / test
Created August 1, 2014 11:17
<?php
test
@4db
4db / Lonely-Worker.markdown
Created October 12, 2014 18:37
A Pen by Oliver Knoblich.
@4db
4db / 0_reuse_code.js
Last active August 29, 2015 14:09
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@4db
4db / README.md
Last active August 29, 2015 14:11 — forked from denji/README.md
@4db
4db / README.md
Last active August 29, 2015 14:13 — forked from denji/README.md

Assumes a fresh install of Ubuntu 12.04 LTS.

  1. Setup the system to handle compiling and installing from source.

     $ sudo apt-get install build-essential
    
  2. If SSL support is needed then we will need to install libssl-dev.

     $ sudo apt-get install libssl-dev
    
//www.lsauer.com 2012
//Answer to:
//http://stackoverflow.com/questions/881085/count-the-number-of-occurances-of-a-character-in-a-string-in-javascript/10671743#10671743
//There are at least four ways. The best option, which should also be the fastest -owing to the native RegEx engine -, is placed at the top. //jsperf.com is currently down, otherwise I would provide you with performance statistics.
#1.
("this is foo bar".match(/o/g)||[]).length
//>2
#2.
"this is foo bar".split("o").length-1
В России разруха и анархия, страна медленно разваливается и никто ни чего не может с этим поделать. Что бы спасти страну решили ученые клонировать Сталина.
Ну, очнулся отец народов, оглядел блядство, что вокруг творилось и сказал:
- Товарищи, что бы спасти страну я имею 2 предложения:
Первое - расстрелять правительство в полном составе. Второе - перекрасить кремль в зеленый цвет.
Кто-то не вытерпел и спрашивает:
- Товарищ Сталин, а кремль то зачем в зеленый перекрашивать?
Сталин с ухмылкой ответил:
- Я так и думал, что по первому пункту у нас разногласий не возникнет.
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@4db
4db / jekyll-drafts.md
Created February 18, 2016 03:01 — forked from benbalter/jekyll-drafts.md
Example of using drafts in Jekyll

Let's say your Jekyll site's directory structure looks like:

|-- _config.yml
|-- _drafts/
|   |-- a-draft-post.md
|-- _layouts/
|   |-- default.html
|-- _posts/
| |-- 2013-05-10-a-published-post