Skip to content

Instantly share code, notes, and snippets.

View huseyin's full-sized avatar

Hüseyin Tekinaslan huseyin

View GitHub Profile
#!/bin/bash
set -e
# Send a private message to someone on slack
# from the command line.
# Print a usage message and exit.
usage(){
local name=$(basename "$0")
# !/bin/bash
#
# KONTEYNIR
# FROM free
# MAINTAINER Hüseyin Tekinaslan <[email protected]>
# -----
# KONTEYNIR
set -eu
@huseyin
huseyin / document.rb
Last active September 17, 2015 15:03
Rakefile'dan önce önizleme.
# encoding: utf-8
# Hüseyin Tekinaslan <[email protected]>
#
# Önizleme dosyasıdır. Ana kaynağı, http://github.com/htaslan/htaslan.github.io deposundadır.
require 'nokogiri'
TEMPLATE = <<-TEMPLATE
<!doctype html>
<html lang=tr>
@huseyin
huseyin / olebole.c
Created October 5, 2015 23:44
gece esintisi bir kod
#include <stdio.h>
#include <stdlib.h>
#define MAX_LINE_LENGTH 81
#define MAX_BYTE_LENGTH 512
int main(void)
{
char kr;
char buffer[MAX_BYTE_LENGTH];
# encoding: utf-8
module Fontize
class FontizeError < StandardError
end
class ArgumentError < FontizeError
end
"******************************************************************************
" File: csycolor.vim
" Description: Highlighting for C syntax
" Maintainer: Hüseyin Tekinaslan <[email protected]>
" License: Program is free software: you can redistribute it and/or
" modify it under the terms of the GNU General Public
" License as published by the Free Software Foundation,
" either version 3 of the License, or (at your option) any
" later version.
"
@huseyin
huseyin / mystring.py
Last active November 10, 2015 19:12
Veri yapıları ödevi
# -*- coding: utf-8 -*-
""" String'ler için birtakım fonksiyonlar
Dikkat: Buradaki fonksiyonlar stringler için built-in fonksiyonlar
değildir. Fonksiyonlar peşi sıra değil, iç içe kullanılmalıdır.
Public değişkenler:
lower_letters: abecesel karakterlerin küçük halleri
upper_letters: abecesel karakterlerin büyük halleri
@huseyin
huseyin / kstat.h
Last active October 26, 2015 06:27
Bir C denemesi
/*
* Copyright (C) 2015 - Hüseyin Tekinaslan <[email protected]>
*
* You should have received a copy of the GNU General Public License
* along with this scripts.
* Ondokuz Mayis University, Samsun 02092015, TURKEY.
*/
#ifndef H_KSTAT_
#define H_KSTAT_
@huseyin
huseyin / listcomp.py
Last active October 25, 2015 19:17
Python list comprehension
# -*- coding: utf-8 -*-
# Cümle içerisindeki kelimelerin uzunluklarını döndür
def wordsize(string):
""" wordsize(string)
"""
return [len(word) for word in string.split()]
# Ufak bir test aracı
def unittest(str, expr):
@huseyin
huseyin / readme.md
Last active November 10, 2015 19:19
Dökümantasyon dosyaları her zaman lokalden deploy edilmemeli. Kurallı bir gist dökümantasyonu linke edilerek site kontentine gönderilebilsin. Bu bir örnek dosya

_

Dizin Yapısı

Bu dizin altında çeşitli uzantıların şablonlarını bulabilirsiniz. Mesela tex formatının templeytleri buradadır. Yer alan formatlar,

  • css: Site içeriklerinin stil şablonları
  • erb: Birtakım ruby kodlarının gömülü olduğu şablonlar
  • js: JavaScript içerikleri