Skip to content

Instantly share code, notes, and snippets.

View dokipen's full-sized avatar

Bob Corsaro dokipen

  • Medium.com
  • Newburyport, MA
View GitHub Profile
var vows = require('vows')
, assert = require('assert')
, path = require('path')
, Syslog = require('node-syslog').Syslog
, Hash = require('traverse/hash')
Syslog.init("embedly-test", Syslog.LOG_PID | Syslog.LOG_ODELAY, Syslog.LOG_INFO)
require.paths.unshift(path.join(__dirname, '../lib'))
for i in bin man lib; do
mkdir -p ~/.npm/${i}
done
cat <<END > ~/.npmrc
binroot = ~/.npm/bin
manroot = ~/.npm/man
root = ~/.npm/lib
END
curl http://npmjs.org/install.sh | sh
echo 'export PATH="${PATH}:~/.npm/bin"' >> ~/.bashrc
(embedly)13:12:52 [doki_pen@wilkenfeld ../embedly.git/embedly][master]$ embedly_oembed -e localhost:8001 http://президент.рф -oforce=true
[
{
"provider_name": "Xn--d1abbgf6aiiy",
"version": "1.0",
"type": "link",
"description": "1 марта вступил в силу закон «О полиции» Совещание по вопросам государственной политики в сфере занятости населения Заседание Комиссии по модернизации и технологическому развитию экономики России Универсальная электронная карта будет вторым паспортом. Или первым? Телефонный разговор с Президентом Казахстана Нурсултаном Назарбаевым Дмитрий Медведев встретился с главным управляющим французского нефтегазового концерна «Тоталь» Кристофом де Маржери Дмитрий Медведев поздравил Михаила Горбачёва с 80-летием 9 марта состоится встреча Дмитрия Медведева с Вице-президентом США Джозефом Байденом Поздравление народной артистке СССР, актрисе МХТ им.А.П.Чехова Ие Саввиной Указ о признании утратившими силу некоторых актов Президента в связи вступлением в силу закона «О полиции» Подп
@dokipen
dokipen / convore-topic-id.rb
Created March 27, 2011 22:35
Not secure function that gets convore topic id by url
#!/usr/bin/env ruby
require 'json'
require 'net/https'
# Run as `ruby convore-topic-id.rb <URL>`
def request(http, path, user, pass)
req = Net::HTTP::Get.new(path)
req.basic_auth user, pass
http.request(req) do |response|
09:43 <+twitter_doki_pen> doki_pen: <robgo> Is it just me? My iphone keeps switching my default calendar
09:45 <+twitter_doki_pen> doki_pen: <markessien> The fatter I get, the less I can be bothered to get excited about things
09:46 <+twitter_doki_pen> doki_pen: <TCSchaef420> Oh fuck you GMail Motion. You're an asshole.
09:49 <+twitter_doki_pen> doki_pen: <rcorsaro> Learn to remember everthing! http://bit.ly/efnJpV
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Angry Nerds <http://www.atlassian.com/en/angrynerd>
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Which nerd are you? post a nerd on your facebook
:::::::::::::::::::::::::::::::::::::::::::
#!/usr/bin/env node
var sys = require('sys')
, WebSocket = require('websocket-client').WebSocket
, ws = new WebSocket('ws://localhost:8000/socket.io/websocket', 'borf')
ws.on('open', function() {
ws.send('listen stomp-client')
})
ws.on('data', function(m) {
@dokipen
dokipen / gist:976449
Created May 17, 2011 13:19
logrotate nginx conf
/var/log/nginx/*.log {
daily
missingok
rotate 52
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
postrotate
13:58:11 [doki_pen@wilkenfeld ~]$ cat tmp/mockup
===========================================================================================================
LLLLLLLL [home] | developers | help | login or signup
LLLLLLLL Embed.ly
LLLLLLLL
LLLLLLLL [Home]| | Products | Company |
LLLLLLLL +----------------------+---------------+
| * Api | * Blog |
@dokipen
dokipen / gist:1010920
Created June 6, 2011 19:37
kernel config
#
# Automatically generated make config: don't edit
# Linux/x86_64 2.6.39-gentoo Kernel Configuration
# Mon Jun 6 13:56:52 2011
#
CONFIG_64BIT=y
# CONFIG_X86_32 is not set
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
var _path="http://scripts.embed.ly/anywhere/";var _embedly={wmode:"opaque",baseTemplate:"",maxwidth:600,excludes:/https?:\/\/youtube\.com|flickr\.com|espn\.go\.com/i,modalTemplate:"",maxheight:400,selector:".postbody",theme:"light",endpoint:"preview",mode:"after",key:"internal",custom_css:"div.embedly { font-family:&#39;Trebuchet MS&#39;,&#39;Lucida Sans Unicode&#39;,&#39;Lucida Grande&#39;,&#39;Lucida Sans&#39;,Arial,sans-serif&#39;, serif; color:0000bf; border-color:0000ff; background-color:5fbf00; div.embedly .embedly-title { font-family:&#39;Courier New&#39;, Courier, monospace; } div.embedly a { color:00bf5f;} div.embedly-overlay { background-color:ff0000; opacity:0.5; -moz-opacity:0.5; -webkit-opacity:0.5; -o-opacity:0.5; -ms-opacity:0.5; }"};(function(e,a){var c=e.createElement(a),b=e.getElementsByTagName(a)[0];c.async=1;c.src=_path+"anywhere.js";b.parentNode.insertBefore(c,b)}(document,"script"));