This file contains hidden or 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/bash | |
countdown() | |
( | |
IFS=: | |
set -- $* | |
secs=$(( ${1#0} * 3600 + ${2#0} * 60 + ${3#0} )) | |
while [ $secs -gt 0 ] | |
do | |
sleep 1 & |
This file contains hidden or 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 | |
$cities = array( | |
"" => "-- SEÇİNİZ --", | |
"ADANA" => "ADANA", | |
"ADIYAMAN" => "ADIYAMAN", | |
"AFYONKARAHİSAR" => "AFYONKARAHİSAR", | |
"AĞRI" => "AĞRI", | |
"AMASYA" => "AMASYA", | |
"ANKARA" => "ANKARA", |
This file contains hidden or 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 | |
/* Make sure strlen behaves as intended by setting multibyte function overload to 0 */ | |
ini_set("mbstring.func_overload", 0); | |
if (ini_get("mbstring.func_overload") > 2) { /* check if mbstring.func_overload is still set to overload strings(2) */ | |
echo "WARNING: mbstring.func_overload is set to overload strings and might cause problems\n"; | |
} | |
class PayuLu | |
{ |
This file contains hidden or 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
<div style="display: none;"> | |
<?php | |
require(public_path() . '/app/libraries/payu/PayuLiveUpdate.class.php'); | |
if ($_SERVER['REMOTE_ADDR'] == '127.0.0.1') { | |
$liveUpdate = new PayuLu('PAYUDEMO', 'P5@F8*3!m0+?^9s3&u8('); // test için bu hesap bilgilerini kullanabilirsiniz. | |
$liveUpdate->setTestMode(); | |
} else { | |
$liveUpdate = new PayuLu('secret','secret'); // Size verilen hesap bilgilerinizi gireceksiniz. |
This file contains hidden or 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
-- Adminer 4.2.1 MySQL dump | |
SET NAMES utf8; | |
SET time_zone = '+00:00'; | |
SET foreign_key_checks = 0; | |
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; | |
DROP TABLE IF EXISTS `cities`; | |
CREATE TABLE `cities` ( | |
`id` bigint(20) NOT NULL AUTO_INCREMENT, |
This file contains hidden or 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
// http://osvaldas.info/detecting-css-animation-transition-end-with-javascript | |
/* | |
By Osvaldas Valutis, www.osvaldas.info | |
Available for use under the MIT License | |
*/ | |
;( function( $, window, document, undefined ) | |
{ | |
var s = document.body || document.documentElement, s = s.style, prefixAnimation = '', prefixTransition = ''; |
This file contains hidden or 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
from lxml import html | |
import requests | |
import sys | |
class App: | |
def __init__(self): | |
self.url = 'http://fullstackradio.com' | |
page = requests.get(self.url) | |
page_string = html.fromstring(page.text) |
This file contains hidden or 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
/* | |
Add csrf token inside meta tag named "csrf-token": | |
<meta name="csrf-token" content="{{ csrf_token() }}"> | |
<a href="posts/2" data-method="delete"> <---- We want to send an HTTP DELETE request | |
- Or, request confirmation in the process - | |
<a href="posts/2" data-method="delete" data-confirm="Are you sure?"> | |
*/ |
This file contains hidden or 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
@servers(['production' => 'user@ipaddress']) | |
@setup | |
$repo = '[email protected]:selahattinunlu/projectname.com.git'; | |
$releaseDir = '/srv/projectname.com/releases'; | |
$storageDir = '/srv/projectname.com/storage'; | |
$appDir = '/srv/projectname.com/current'; | |
$release = 'release_' . date('d-m-Y-His'); | |
@endsetup |
This file contains hidden or 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
$('[data-sortable]').sortable({ | |
axis: 'y', | |
update: function(event, ui) { | |
var data = { | |
model: $(this).data('model'), | |
sort: $(this).sortable('toArray') | |
} | |
$.ajax({ | |
type: 'POST', |
OlderNewer