Skip to content

Instantly share code, notes, and snippets.

View sayz's full-sized avatar
🏠
Working from home

Sefa Yıldız sayz

🏠
Working from home
View GitHub Profile
bu giste de ne oluyor bir bakalım :?
@seddi
seddi / findname_with_regexp.py
Created March 9, 2011 04:51
.txt'den okudugu isimlerden duzenli ifadeye uyanları verilen isimdeki dosyaya yazar...
#!/usr/bin/python3
#-*- coding:utf-8 -*-
import sys
import re
sesli = ['a', 'e', 'ı', 'i', 'o', 'ö', 'u', 'ü', 'A', 'E', 'I', 'i', 'O', 'Ö', 'U', 'Ü']
sessiz = ['b', 'c', 'ç', 'd', 'f', 'g', 'ğ', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'r', 's', 'ş', 't', 'v', 'y', 'z', 'B', 'C', 'Ç', 'D', 'F', 'G', 'Ğ', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'R', 'S', 'Ş', 'T', 'V', 'Y', 'Z' ]
def reg_exp(list):
@senko
senko / onchange.sh
Last active July 14, 2023 07:54
OnChange - Watch current directory and execute a command if anything in it changes
#!/bin/bash
#
# Watch current directory (recursively) for file changes, and execute
# a command when a file or directory is created, modified or deleted.
#
# Written by: Senko Rasic <senko.rasic@dobarkod.hr>
#
# Requires Linux, bash and inotifywait (from inotify-tools package).
#
# To avoid executing the command multiple times when a sequence of
@imathis
imathis / task.rb
Created March 27, 2012 18:56
Edit Octopress post
desc "Edit a post (defaults to most recent)"
task :edit_post, :title do |t, args|
args.with_defaults(:title => false)
posts = Dir.glob("#{source_dir}/#{posts_dir}/*.*")
post = (args.title) ? post = posts.keep_if {|post| post =~ /#{args.title}/}.last : posts.last
if post
puts "Opening #{post} with #{editor}..."
system "#{ENV['EDITOR']} #{post} &"
else
puts "No posts were found with \"#{args.title}\" in the title."
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 24, 2024 17:56
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@roktas
roktas / goae
Last active October 8, 2015 10:38
Google App Engine Go projelerini derleyen bir sarmalayıcı
#!/bin/bash
PROGNAME=${0##*/}
# iletiyi stderr'de görüntüle
message() {
printf -- "$*\n" | fold -s -w ${COLS:-80} >&2
}
# hata iletisi
@KartikTalwar
KartikTalwar / Documentation.md
Last active June 25, 2024 10:55
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@ecylmz
ecylmz / card.go
Last active December 15, 2015 02:29
package main
import (
"fmt"
"sort"
"math/rand"
"time"
"strings"
)
@rcoup
rcoup / rsync_parallel.sh
Created April 10, 2013 21:52
Parallel-ise an rsync transfer when you want multiple concurrent transfers happening,
#!/bin/bash
set -e
# Usage:
# rsync_parallel.sh [--parallel=N] [rsync args...]
#
# Options:
# --parallel=N Use N parallel processes for transfer. Defaults to 10.
#
# Notes:
# encoding: UTF-8
#
# UBS'de girilen içerik EBS üzerinden webde görülebilmektedir. Bu betik
# yardımıyla Bilgisayar Mühendisliği Bölümü'ne ait tüm derslerin içerik tek bir
# html dosya olarak üretilmektedir. Ayrıca içeriği eksik olan derslere ait
# raporlar üretilmektedir.
#
# Usage:
# $ ruby ders-icerigi-ve-eksik-icerik-belirleme-ebs-yardimiyla.rb
#