Skip to content

Instantly share code, notes, and snippets.

@roktas
roktas / gist:6f1d833cf5aa62d91eb4
Created September 18, 2014 13:15
seconds from last aptitude update
bash -c 'echo $(($(date +%s) - $(stat -c '%Y' /var/lib/aptitude/pkgstates)))'
from random import randrange
import time
def kelime2():
puan=0
list1=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','r','s','t','u','v','w','x','y','z']
list2=['a','a','a','a','a','a','a','a','a']
list3=['a','a','a','a','a','a','a','a','a']
### Keybase proof
I hereby claim:
* I am roktas on github.
* I am roktas (https://keybase.io/roktas) on keybase.
* I have a public key whose fingerprint is FF5A 805B 4C59 2044 CFE2 E305 72BB 34DF 2B9D 0E3A
To claim this, I am signing this object:
@roktas
roktas / t.go
Created November 24, 2014 18:18
// Copyright 2011 The Go Authors. 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 (
"bytes"
"encoding/binary"
"fmt"
#!/bin/bash
YASAKLILAR_DOSYASI=yasaklılar.txt
ilkle() {
if [[ ! -f $YASAKLILAR_DOSYASI ]]; then
echo >&2 "$YASAKLILAR_DOSYASI dosyası bulunamadı."
exit 1
fi
}
#!/bin/bash
docview() {
if [[ -f $1 ]] ; then
case $1 in
*.pdf) evince "$1" ;;
*.ps) evince "$1" ;;
*.odt) oowriter "$1" ;;
*.txt) leafpad "$1" ;;
*.doc) oowriter "$1" ;;
#!/bin/bash
tolower() {
echo "$1" | tr A-Z a-z
}
varmi() {
if tolower "$1"; then
echo >&2 "'$1' mevcut"
return 0
#!/usr/bin/env ruby
# Abecesel isim üret
#
# Gereksinimler: Ruby >= 2.1, turkish_support (gem)
require 'optparse'
require 'ostruct'
require 'yaml'
#!/usr/bin/env ruby
module Turkish
def self.native_downcased_alphabet
'abcçdefgğhıijklmnoöprsştuüvyz'
end
def self.native_upcased_alphabet
'ABCÇDEFGĞHIIJKLMNOÖPRSŞTUÜVYZ'
end
#!/bin/bash
join() { local IFS="$1"; shift; echo "$*"; }
while read -a dirs; do
dir=$(join / "${dirs[@]}")
mkdir -p "$dir"
done < "$1"