This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!empty($_FILES)) { | |
$tempFile = $_FILES['Filedata']['tmp_name']; | |
$targetPath = $_SERVER['DOCUMENT_ROOT'] . $_GET['folder'] . '/images/products/'; | |
$ext = pathinfo($_FILES['Filedata']['name'], PATHINFO_EXTENSION); | |
$newFileName = md5($tempFile.microtime()).'.'.$ext; | |
$targetFile = str_replace('//','/',$targetPath) . $newFileName; | |
move_uploaded_file($tempFile,$targetFile); | |
} | |
echo $newFileName; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$sonuc = dns_get_record("halid.org", DNS_A + DNS_MX + DNS_CNAME + DNS_NS + DNS_PTR + DNS_TXT + DNS_HINFO + DNS_SOA + DNS_AAAA + DNS_A6 + DNS_SRV + DNS_NAPTR); | |
print_r($sonuc); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.kulucka.googlereaderwrapper; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.view.Window; | |
import android.webkit.WebChromeClient; | |
import android.webkit.WebView; | |
import android.webkit.WebViewClient; | |
public class GoogleReaderWrapper extends Activity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form method="post"> | |
<input type="text" name="url" value="" style="width: 300px"> | |
<input type="submit" value="getir"> | |
</form> | |
<?php | |
ob_start(); | |
if(isset($_POST['url'])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OLD_IFS=$IFS | |
IFS=$'\n' | |
lines_ary=( $(cat "./mail.txt") ) | |
IFS=$OLD_IFS | |
for idx in $(seq 0 $((${#lines_ary[@]} - 1))); do | |
line="${lines_ary[$idx]}" | |
zmprov da ${line} | |
printf "${line} removed!\n" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ZSH=$HOME/.oh-my-zsh | |
ZSH_THEME="random" | |
setopt AUTO_CD # cd if no matching command | |
setopt AUTO_PARAM_SLASH # adds slash at end of tabbed dirs | |
setopt CHECK_JOBS # check bg jobs on exit | |
setopt EXTENDED_GLOB # globs #, ~ and ^ | |
setopt EXTENDED_HISTORY # saves timestamps on history | |
setopt GLOB_DOTS # find dotfiles easier | |
setopt HASH_CMDS # save cmd location to skip PATH lookup | |
setopt HIST_EXPIRE_DUPS_FIRST # expire duped history first |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker_processes 4 | |
working_directory "/usr/local/share/redmine" | |
listen "/usr/local/share/redmine/tmp/pids/.unicorn.sock", :backlog => 64 | |
listen 8080, :tcp_nopush => true | |
timeout 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream redmine_stack { | |
server unix:/usr/local/share/redmine/tmp/pids/unicorn.sock fail_timeout=0; | |
} | |
server { | |
client_max_body_size 100M; | |
server_name alanadi.com; | |
keepalive_timeout 5; | |
root /usr/local/share/redmine/public; | |
try_files $uri/index.html $uri.html $uri @app; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# glassfish Startup script for glassfish | |
# | |
# chkconfig: - 99 01 | |
# processname: glassfish | |
# config: /etc/glassfish/glassfish.conf | |
# config: /etc/sysconfig/glassfish | |
# pidfile: /var/run/glassfish.pid | |
# description: glassfish is a JavaEE Application Server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for golang | |
# mkdir $HOME/go | |
# mkdir -p $GOPATH/src/github.com/user | |
export GOPATH=$HOME/go | |
export PATH=$PATH:$GOPATH/bin |
OlderNewer