I hereby claim:
- I am tonkla on github.
- I am tonkla (https://keybase.io/tonkla) on keybase.
- I have a public key ASDrxFwTdCyuuJHtwdhv4JQXe6Nfmv79AU9wnjHidGf-AQo
To claim this, I am signing this object:
| import { Directive, ElementRef, Input, OnInit } from '@angular/core'; | |
| import { Http, Headers, RequestOptionsArgs, ResponseContentType } from '@angular/http'; | |
| import { AuthenticationService } from '../services'; | |
| @Directive({ selector: '[httpSrc]' }) | |
| export class HttpSrcDirective implements OnInit { | |
| @Input('httpSrc') url: string; | |
| constructor(private el: ElementRef, private http: Http, private authService: AuthenticationService) {} |
| #!/bin/bash | |
| if [ "$#" == "0" ]; then | |
| echo "You need to supply at least one argument!" | |
| exit 1 | |
| fi | |
| DOMAINS=('.com' '.net' '.org') | |
| ELEMENTS=${#DOMAINS[@]} |
I hereby claim:
To claim this, I am signing this object:
| func Round(num float64, precision uint) float64 { | |
| pow := math.Pow(10, float64(precision)) | |
| n := int((num * pow) + math.Copysign(0.5, num)) | |
| return float64(n) / pow | |
| } |
| require 'rubygems' | |
| require 'erb' | |
| require 'mysql2' | |
| require 'thor' | |
| class Blogelf < Thor | |
| desc 'migrate', 'Migrate from MySQL to Markdown text file (Jekyll)' | |
| def migrate | |
| Dir.mkdir('_posts') unless Dir.exist?('_posts') | |
| db = Mysql2::Client.new(host: 'localhost', username: 'root', database: 'blogelf') |
| #! /usr/bin/env thor | |
| require 'mysql2' | |
| class Tonkla < Thor | |
| desc 'migrate', 'migrate tonkla.com\'s blog posts from Drupal to Rails' | |
| def migrate | |
| db_from = Mysql2::Client.new(host: 'localhost', username: 'root', database: 'tonkla_com') | |
| db_to = Mysql2::Client.new(host: 'localhost', username: 'root', database: 'klass_blog_development') | |
| result = db_from.query('SELECT r.title, r.body, n.created AS created_at, r.timestamp AS updated_at |