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
function delayTimer(delay){ | |
var timer; | |
return function(fn){ | |
timer=clearTimeout(timer); | |
if(fn) | |
timer=setTimeout(function(){ | |
fn(); | |
},delay); | |
return timer; | |
} |
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
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, "http://vbox7.com/play/magare.do"); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_POST, true); | |
$data = array( | |
'onLoad' => '[type Function]', | |
'vid' => 'e0b5fa18' | |
); | |
curl_setopt($ch, CURLOPT_POSTFIELDS, $data); | |
$output = curl_exec($ch); |
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
function arrayToSql($table, $array, $insert = "INSERT INTO") { | |
if ($insert != "UPDATE") { | |
$insert = "INSERT INTO"; | |
} | |
$columns = array (); | |
$data = array (); | |
foreach ( $array as $key => $value ) { | |
$columns [] = $key; | |
if ($value != "") { |
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
/* | |
* author: yuks; | |
* last edit: 17.07.2012 | |
*/ | |
(function($) { | |
$.VirtualPaging = function(element, options) { | |
var defaults = { | |
perPage: 10, | |
'tablePagingPrefix':'stranicirane' | |
}; |
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
final ViewPager vp = (ViewPager) findViewById(R.id.top_imageViewPager); | |
vp.setPageMargin(-50); | |
vp.setHorizontalFadingEdgeEnabled(false); | |
vp.setFadingEdgeLength(30); | |
adapter = new ImageViewAdapterClubObekt(cnt, snimki_top); | |
vp.setAdapter(adapter); | |
vp.setOnTouchListener(new View.OnTouchListener() { | |
int dragthreshold = 30; | |
int downX; | |
int downY; |
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 | |
/** | |
* MongoClient STUB File | |
* | |
* This class is *only* useful as a stub file to help your IDE provide autocompletion information. You should never | |
* require, include, or otherwise use this class in your application code. | |
*/ | |
class MongoClient | |
{ | |
const VERSION = '3.x'; |
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
import org.acra.*; | |
import org.acra.annotation.*; | |
@ReportsCrashes( | |
formKey = "test", | |
disableSSLCertValidation = true, | |
formUri = "https://bugtower.net/api/send/?api_key=YOUR_API_KEY", | |
httpMethod = org.acra.sender.HttpSender.Method.POST) | |
public class MyApplication extends Application { |
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
set -e | |
dir=/var/www/default/public_images | |
for ext in png gif; do | |
for i in `find "$dir" -type f -regex '.*'$ext `; do | |
( filename=${i%.*} | |
convert "$i" -quality 90 -strip "$filename.jpg" | |
echo "$filename" ) | |
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
#!/bin/bash | |
set -e | |
username="backup" | |
password="NoFonE" | |
pcloud_username="pCloud username" | |
pcloud_password="pCloudoAuthToken" |
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
import sys | |
import re | |
import glob | |
import os | |
result = {} | |
p = re.compile(ur'__\("(...+)"\)|__\(\'(...+)\'\)', re.MULTILINE | re.UNICODE) | |
OlderNewer