- Переехал на wantr.ru/miripiruni
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
twitter = require 'twitter-text' | |
module.exports = (tweet) -> | |
# Преобразуем только ссылки, хештеги и аккаунты оставляем текстом | |
text = twitter.autoLinkUrlsCustom tweet.text, target: '_blank' | |
# Заменяем сжатые ссылки на нормальные | |
if tweet.entities.urls? and tweet.entities.urls.length > 0 | |
for entity in tweet.entities.urls | |
text = text.replace entity.url, entity.expanded_url |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "deb http://vontaene.de/raspbian-updates/ . main" >> /etc/apt/sources.list | |
apt-get update | |
apt-get install libgstreamer1.0-0 libgstreamer1.0-0-dbg libgstreamer1.0-dev liborc-0.4-0 liborc-0.4-0-dbg liborc-0.4-dev liborc-0.4-doc gir1.2-gst-plugins-base-1.0 gir1.2-gstreamer-1.0 gstreamer1.0-alsa gstreamer1.0-doc gstreamer1.0-omx gstreamer1.0-plugins-bad gstreamer1.0-plugins-bad-dbg gstreamer1.0-plugins-bad-doc gstreamer1.0-plugins-base gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-base-dbg gstreamer1.0-plugins-base-doc gstreamer1.0-plugins-good gstreamer1.0-plugins-good-dbg gstreamer1.0-plugins-good-doc gstreamer1.0-plugins-ugly gstreamer1.0-plugins-ugly-dbg gstreamer1.0-plugins-ugly-doc gstreamer1.0-pulseaudio gstreamer1.0-tools gstreamer1.0-x libgstreamer-plugins-bad1.0-0 libgstreamer-plugins-bad1.0-dev libgstreamer-plugins-base1.0-0 libgstreamer-plugins-base1.0-dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if pgrep gst-launch | |
then | |
pkill gst-launch | |
else | |
DIR=`date "+%Y-%m-%d-%H:%M:%S"` | |
mkdir $DIR | |
gst-launch \ | |
flvmux name=camera ! filesink location="$DIR/camera.flv" \ | |
flvmux name=screen ! filesink location="$DIR/screen.flv" \ | |
\ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Functions | |
svgz() { | |
gzip $1 -S z | |
} | |
svg() { | |
file=$1 | |
name=${file%.*} | |
mv ${file} ${name}.svg.gz && gunzip ${name}.svg.gz | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
Ведётся для друзей (что тебе подарить?) и для себя (куда бы потратить деньги?). Если вы хотите меня порадовать, то можете купить что-нибудь из списка ниже или просто перевести мне денег в качестве комплимента. Перед тем, как что-либо купить, сообщите мне о своём намерении, чтобы не было пересечений в сезонные подарочные периоды. Исключение составляет только список «Прочее».
Книга про буквы от Аа до Яя— 1 800 руб.- Образцы шрифтов — 1 300 руб.
Новая типографика. Руководство для современного дизайнера— 1 000 руб.- Облик книги — 800 руб.
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 = [email protected]: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:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urlparse | |
import re | |
from django.db import models | |
from django import forms | |
def validate_youtube_url(value): | |
'''El patron lo saque de http://stackoverflow.com/questions/2964678/jquery-youtube-url-validation-with-regex''' | |
pattern = r'^http:\/\/(?:www\.)?youtube.com\/watch\?(?=.*v=\w+)(?:\S+)?$' |
NewerOlder