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 | |
require('posterous-api.php'); | |
$api = new PosterousAPI('email', 'password'); | |
header('Content-type: text/html'); | |
function pre_dump($var) { | |
echo "<pre>"; | |
var_dump($var); | |
echo "</pre>"; |
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 | |
/* PHP class for uploading file via FTP wich automatically make non-exist directory recursively */ | |
<?php | |
class FTPUploader { | |
private static function make_directory($ftp_stream, $dir) | |
{ | |
// if directory already exists or can be immediately created return true | |
if (FTPUploader::ftp_is_dir($ftp_stream, $dir) || @ftp_mkdir($ftp_stream, $dir)) return true; |
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
This is an excerpt. Lorem ipsum dolor sit amet, consectetur adipisicing elit, | |
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim | |
ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip | |
ex ea commodo consequat. | |
<!-- more --> | |
The rest of the content goes here.Duis aute irure dolor in reprehenderit | |
in voluptate velit esse | |
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non |
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 net.akhyar.android.async; | |
import java.lang.ref.WeakReference; | |
import android.os.AsyncTask; | |
public abstract class WeakTask<I, O, T> extends AsyncTask<Void, Void, O> { | |
protected final WeakReference<T> targetRef; | |
protected I input; | |
public WeakTask(I input, T target) { |
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
""" | |
script by @akhy | |
generate android xml state drawables from png | |
""" | |
from sys import argv | |
from os import listdir |
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
Verifying myself: My Bitcoin username is +akhyar. https://onename.io/akhyar |
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 de.markusfisch.android.textrect; | |
import android.app.Activity; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.graphics.RectF; | |
import android.os.Bundle; | |
import android.view.SurfaceHolder; | |
import android.view.SurfaceView; |
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
/usr/libexec/PlistBuddy -c 'Add :LSUIElement bool true' /Applications/iTerm.app/Contents/Info.plist |
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
// Jenkins > Manage Jenkins > Script Console | |
Jenkins.instance.getItemByFullName('JobName').builds.findAll { it.number > 5 && it.number < 10 }.each { it.delete() } |
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
// requires StringHelpers | |
enum class GravatarDefault(val str: String) { | |
ERROR_404 ("404"), | |
MYSTERY ("mm"), | |
IDENTICON ("identicon"), | |
MONSTER ("monsterid"), | |
WAVATAR ("wavatar"), | |
RETRO ("retro"), | |
BLANK ("blank"), |
OlderNewer