Skip to content

Instantly share code, notes, and snippets.

View ayr-ton's full-sized avatar
⛩️
In the zone

Ayrton ayr-ton

⛩️
In the zone
  • Belo Horizonte
View GitHub Profile
@ayr-ton
ayr-ton / .vimrc
Created September 18, 2012 17:49
My .vimrc (python optimized)
set showmode
set cindent
set smartindent
set autoindent
set modeline
set expandtab
set tabstop=8
set softtabstop=4
set shiftwidth=4
set autoread
@ayr-ton
ayr-ton / people.js
Last active December 19, 2015 23:09
Restify people
var restify = require('restify')
, person = require('save')('people')
var server = restify.createServer({ name: 'people-api' })
server.listen(3000, function () {
console.log('%s listening at %s', server.name, server.url)
})
server
@ayr-ton
ayr-ton / fixCommitterInfo.sh
Created July 24, 2013 15:38
Changing a commiter info in git history for all commits
#!/bin/bash
# Change the line four with the stuff that fit your needs
WRONGNAME = "wrong.name" ; NAME="Real Name"; EMAIL="real@email";
git filter-branch --env-filter 'if [ $GIT_COMMITTER_NAME = $WRONGNAME ]; then GIT_AUTHOR_EMAIL=$EMAIL; GIT_COMMITTER_NAME=$NAME; GIT_AUTHOR_NAME=$NAME; GIT_COMMITTER_EMAIL=$EMAIL; fi'
@ayr-ton
ayr-ton / 0_reuse_code.js
Created March 14, 2014 18:56
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
@ayr-ton
ayr-ton / mergesort.c
Created June 2, 2014 20:45
Mergesort (internal)
#include <stdio.h>
#include <stdlib.h>
#define LEN 20
#define MAXEL 100
void merge(int * list, int left_start, int left_end, int right_start, int right_end)
{
int left_length = left_end - left_start;
int right_length = right_end - right_start;
--- ddclient.orig 2013-09-26 01:06:12.399990673 +0100
+++ ddclient 2013-09-26 06:25:36.768189452 +0100
@@ -13,12 +13,17 @@
# Support for multiple IP numbers added by
# Astaro AG, Ingo Schwarze <ischwarze-OOs/[email protected]> September 16, 2008
#
+# Modified to work with Cloudflare by Robert Ian Hawdon 2012-07-16: http://robertianhawdon.me.uk/
+#
+# Further modified to work with Cloudflare by Peter Roberts 2013-9-26, 2014-6-22: blog.peter-r.co.uk
+#

This is a very rough script to export your octopress files to Ghost. You will still need to check your data but it will give you a head start. Feel free to fork and optimize the script for your purpose.

The following should be considered:

  1. You need to execute the script in the source/_posts directory
  2. You need to manually copy all the images to /var/www/ghost/content/images
  3. Images with external URLs are not handled
  4. Blockquotes have their issues
  5. Lists are not exported correctly
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../paper-input/paper-input.html">
<link rel="import" href="../paper-slider/paper-slider.html">
<polymer-element name="my-element">
<template>
<style>
:host {
@ayr-ton
ayr-ton / docker-compose.yml
Last active August 29, 2015 14:22
Playbooks for install all my docker gadgets
---
- hosts: '{{ hosts }}'
sudo: yes
tasks:
- name: Install curl
apt: pkg=curl state=latest update_cache=yes
- name: Install docker-compose
shell: curl -L https://github.com/docker/compose/releases/download/1.3.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
@ayr-ton
ayr-ton / .nvmrc
Last active April 4, 2016 23:51
Blinking lights
0.10