Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View 2hamed's full-sized avatar
🏠
Working from home

Hamed Momeni 2hamed

🏠
Working from home
View GitHub Profile
/*
* trello-rtl-support
* https://github.com/ykh/trello-rtl-support
* This script is a solution to trello can detect rtl content and apply correct behaviors
* Licensed under the GNU GPL v2 license.
*/
(function ($, document) {
var doms = 'h1, h2, h3, p ,a',
inputs = 'textarea, input[type=text]';
$(document).ajaxComplete(function () {
@2hamed
2hamed / PrefsUtil.java
Created June 25, 2015 06:42
PrefsUtil.java
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
/**
* Created by Hamed on 11/24/2014.
*/
public class PrefsUtil {
public static final String PREFS_LOGIN_USERNAME_KEY = "__USERNAME__";
public static final String PREFS_LOGIN_PASSWORD_KEY = "__PASSWORD__";
@2hamed
2hamed / DownloadAndPlayAsyncTask.java
Created July 4, 2015 11:06
Download And Play AsyncTask
import android.os.AsyncTask;
import android.util.Log;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
package com.imnumbers.imnumbers.newchat.interfaces;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
public class RecyclerItemClickListener implements RecyclerView.OnItemTouchListener {
private static final String TAG = "RecyclerItemClickListe";
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:duration="300"
android:fromXDelta="0%"
android:fromYDelta="0%"
android:startOffset="150"
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:duration="300"
android:fromXDelta="-100%"
android:fromYDelta="0%"
android:toXDelta="0%"
android:toYDelta="0%"
android:zAdjustment="top"/>
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:duration="300"
android:fromXDelta="0%"
android:fromYDelta="0%"
android:toXDelta="-100%"
android:toYDelta="0%"
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:duration="300"
android:fromXDelta="100%"
android:fromYDelta="0%"
android:toXDelta="0%"
android:toYDelta="0%"
android:zAdjustment="top"/>
@2hamed
2hamed / html5.boilerplate.html
Last active December 16, 2015 00:10
My very own html5 template boilerplate.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="style.css" />
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<title><?php bloginfo('name'); ?> | <?php is_home() ? bloginfo('description') : wp_title(''); ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" />
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>