Skip to content

Instantly share code, notes, and snippets.

View aliab's full-sized avatar
🤨

Ali Abdollahi aliab

🤨
View GitHub Profile
# Add this to .zprofile
# From "brew" php@7.1
export PATH="/usr/local/opt/php@7.1/bin:$PATH"
export PATH="/usr/local/opt/php@7.1/sbin:$PATH"

Keybase proof

I hereby claim:

  • I am aliab on github.
  • I am aliabdolahi (https://keybase.io/aliabdolahi) on keybase.
  • I have a public key whose fingerprint is BA2D 9189 C38D 500C 3EF0 F565 CFB3 A783 EA23 F961

To claim this, I am signing this object:

@aliab
aliab / trial.java
Created March 13, 2015 11:33
simple android trial checking!
private void trial() {
Calendar expirationDate = Calendar.getInstance();
expirationDate.set(2015, 3, 15); // hardcoded expiration date
Calendar t = Calendar.getInstance(); // Calendar with current time/date
if (t.compareTo(expirationDate) == 1) {
finish();
Toast.makeText(getApplicationContext(),"Your Trial have been EXPIRED!", Toast.LENGTH_SHORT).show();
}
}
@aliab
aliab / Ecryptor.java
Created September 9, 2014 10:47
this is java class for encrypt/decrypt any Android resource, o bye[] file
package net.appersian.android.wod.common;
import java.security.SecureRandom;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
public class Encryptor {
@aliab
aliab / gist:5384350
Created April 14, 2013 21:43
Simple Boiler Plate for making Game with HTML5/JS targeting browser/ios/android
var GAMENAME =
{
WIDTH: 320,
HEIGHT: 480,
scale: 1,
offset: { top: 0, left: 0 },
RATIO: null,
currentWidth: null,
@aliab
aliab / gist:5384247
Last active December 16, 2015 05:28
multifile uploader in razor engine and ASP.NET
@{
var newFileName = "";
var imagePath = "";
var fileName="";
var path = HttpContext.Current.Server.MapPath("~/");
if(IsPost){
// make time instance to make folder base on time
System.DateTime moment = DateTime.Now;
string timeFolderName = moment.Day + "-" + moment.Month + "-" + moment.Year;
// make HttpPostedFileBase variable to get files into it