Setup your Digital Ocean droplet.
your machine:
ssh root@IP-ADDRESS
on the server:
passwd
<div class="navi-live"> | |
<ol ui-nested-sortable="{ | |
listType: 'ol', | |
items: 'li', | |
doNotClear: true, | |
placeholder: 'ui-state-highlight', | |
forcePlaceholderSize: true, | |
toleranceElement: '> div' | |
}" ui-nested-sortable-stop="update($event, $ui)" class="navi-item-container ui-sortable"><li ya-tree="child in data.children at ol" ng-class="{minimized:child.minimized}" class="navi-item ng-scope" ng-style="getStyle(child)" style="font-weight: bold;"> | |
<div class="nav-item-contents"> |
Setup your Digital Ocean droplet.
your machine:
ssh root@IP-ADDRESS
on the server:
passwd
// Copyright 2013 Luke Holder. All rights reserved. | |
// Use of this source code is governed by a BSD-style | |
// license that can be found in the LICENSE file. | |
package main | |
import ( | |
"github.com/russross/blackfriday" | |
"io/ioutil" | |
"net/http" |
<style type="text/css"> | |
*:not(input,textarea) { | |
-webkit-touch-callout: none; | |
-webkit-user-select: none; /* Disable selection/Copy of UIWebView */ | |
} | |
</style> |
all_images = Nokogiri.parse(body).css('a[href]').map { |a| a[:href] }.grep(/\.(?:png|jpg)\z/i) | |
all_images << Nokogiri.parse(body).css('img[src]').map { |a| a[:src] }.grep(/\.(?:png|jpg)\z/i) |
#!/bin/env ruby | |
# encoding: utf-8 | |
require 'rubygems' | |
require 'bundler/setup' | |
# require your gems as usual | |
require 'sequel' | |
require 'nokogiri' | |
require 'time' |
//This script redirects all the links via blankrefer.com - except for the sites that were included in the protected_links string | |
//Example: | |
//var protected_links = "myspace,ebay"; | |
var protected_links = ""; | |
var a_to_va = 0; | |
var a_to_vb = 0; | |
var a_to_vc = ""; | |
function blank_refer() | |
{ |
{ | |
"require": { | |
"silex/silex": "1.0.*@dev", | |
"twig/twig": ">=1.8,<2.0-dev", | |
"symfony/twig-bridge": "~2.1", | |
"monolog/monolog": ">=1.0.0" | |
} | |
} |
#!/bin/env ruby | |
# encoding: utf-8 | |
text = <<-eos | |
blablablablabla<p>[caption id="attachment_7055" align="alignleft" width="205"]<a href="http://tenina.com/wp-content/uploads/2013/03/Bunny-with-eggs.jpg"><img class="size-medium wp-image-7055" alt="Little egg garden…hop a long bunny!" src="http://tenina.com/wp-content/uploads/2013/03/Bunny-with-eggs-205x300.jpg" width="205" height="300" /></a> Little egg garden…hop a long bunny![/caption]</p>blablablablabla | |
eos | |
newcaptionregex = Regexp.new('\[(\w*?)(.*?)\](.*?<word>)\[\/\1\]') | |
text.gsub!(newcaptionregex, "\\3") |