Skip to content

Instantly share code, notes, and snippets.

View hmert's full-sized avatar
🎃
fintech

Hüseyin Mert hmert

🎃
fintech
View GitHub Profile
{
"hello": {
"K": "Salemetsiz",
"M": "Sain Baina uu"
},
"thank you": {
"K":"Rahmet",
"M":"Bayarlalaa"
},
"fly":{
{
"keys": ["searchkey"] ,
"values": [
["zulüm"],
["kedi"],
["kebap"],
["recep tayyip erdoğan"]
]
}
<!DOCTYPE html>
<html class="full" lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>Full Page Image Background Template for Bootstrap 3</title>
@hmert
hmert / cors-nginx.conf
Last active December 30, 2015 06:19 — forked from michiel/cors-nginx.conf
#
# Wide-open CORS config for nginx
#
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
#
<html>
<head>
<!-- Load jQuery from Google's CDN -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<!-- Source our javascript file with the jQUERY code -->
<script src="script.js"></script>
</head>
<body>
<h3>Choose file(s)</h3>
<p>
@hmert
hmert / sakin_yapma.sh
Created August 20, 2013 13:58
bunu sakın yapmayın
#!/usr/bin/sh
#
# bunu sakın yapmayın
#
iptable -F && iptables -P INPUT DROP && iptables -P OUTPUT DROP && iptables -P FORWARD DROP && reboot
@hmert
hmert / get_table_and_column_names.sql
Created August 2, 2013 13:48
getting all column names from all tables in Mysql without having to list all the tables
select TABLE_SCHEMA,TABLE_NAME,COLUMN_NAME from information_schema.columns
where table_schema = 'eba'
order by table_name,ordinal_position limit 10000
if(!String.prototype.reverse)
{
Object.defineProperty(String.prototype, 'stripTags',
{
value: function()
{
return this.replace(/<\/?[^>]+>/gi, '');
},
enumerable: false
});
window.shuffleArray = (function() {
return function(arr) {
for(var j, x, i = arr.length; i; j = parseInt(Math.random() * i), x = arr[--i], arr[i] = arr[j], arr[j] = x);
return arr;
}
})();
<?php
function recursive_directory($dirname,$maxdepth=10, $depth=0){
if ($depth >= $maxdepth) {
return false;
}
$subdirectories = array();
$files = array();
if (is_dir($dirname) && is_readable($dirname)) {
$d = dir($dirname);
while (false !== ($f = $d->read())) {