Skip to content

Instantly share code, notes, and snippets.

View huseyin's full-sized avatar

Hüseyin Tekinaslan huseyin

View GitHub Profile
@huseyin
huseyin / u
Created September 27, 2017 21:05
k
@huseyin
huseyin / p
Created September 27, 2017 21:07
t
@huseyin
huseyin / l
Created September 27, 2017 21:08
m
#!/bin/bash
pushd /tmp
rm -rf vagrant_*
wget -qO- https://releases.hashicorp.com/index.json >releases.json
version=$(cat releases.json | jq -r '.vagrant.versions | keys' | jq -r max)
package="vagrant_"$version"_x86_64.deb"
@huseyin
huseyin / scaleway.rb
Last active May 6, 2018 13:05
Scaleway API (create, start and stop server)
#!/usr/bin/env ruby
require 'json'
require 'net/https'
require 'openssl'
require 'uri'
# Scaleway => APIClass
class Scaleway
API_ENDPOINT = 'https://cp-ams1.scaleway.com'.freeze
@huseyin
huseyin / logger.sh
Created January 1, 2018 14:32
Bash logger
#!/usr/bin/env bash
Logger() {
local LogLevel
Entry() {
log.debug() {
LogLevel=debug
format.print "$@"
}
#include <stdio.h>
#include <stdlib.h>
int main(void) {
if (0) { printf("Hello world: 0\n"); }
if (1) { printf("Hello world: 1\n"); }
if (2) { printf("Hello world: 2\n"); }
return EXIT_SUCCESS;
}
@huseyin
huseyin / tdk.rb
Last active November 26, 2018 12:10 — forked from roktas/tdk.yml
# frozen_string_literal: true
module TurkishSupport
ABBREVIATIONS = {
'age.' => 'age.',
'agm.' => 'agm.',
'agy.' => 'agy.',
'alb.' => 'Alb.',
'alm.' => 'Alm.',
'anat.' => 'anat.',
DEBUG subprocess: stdout: CPU use: 1.04 seconds
DEBUG subprocess: stdout: BlkIO use: 32.00 KiB
DEBUG subprocess: stdout: Memory use: 30.04 MiB
DEBUG subprocess: stdout: KMem use: 8.47 MiB
DEBUG subprocess: stdout: Link: vethPA4XGA
TX bytes: 806 bytes
RX bytes: 7.15 KiB
Total bytes: 7.94 KiB
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
DEBUG subprocess: stdout: CPU use: 1.04 seconds
DEBUG subprocess: stdout: BlkIO use: 32.00 KiB
DEBUG subprocess: stdout: Memory use: 30.04 MiB
DEBUG subprocess: stdout: KMem use: 8.47 MiB
DEBUG subprocess: stdout: Link: vethPA4XGA
TX bytes: 806 bytes
RX bytes: 7.15 KiB
Total bytes: 7.94 KiB
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0