-
First get to the existing directory
$ cd my/folder/
-
Now start a new git repository
$ git init
-
Identify if the current elements on the directory are needed or not and add them to the .gitignore file. When ready...
$ vim .gitignore
-
When ready create the first commit on the server
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 | |
/** | |
* simple method to encrypt or decrypt a plain text string | |
* initialization vector(IV) has to be the same when encrypting and decrypting | |
* | |
* @param string $action: can be 'encrypt' or 'decrypt' | |
* @param string $string: string to encrypt or decrypt | |
* | |
* @return string | |
*/ |
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 | |
// Function to get difference of two timestamp into years, months, days, hours, minutes and seconds | |
function getTimeDifference($datetime1, $datetime2, $inShort = true) { | |
$datetime1 = new DateTime(date('Y-m-d H:i:s', $datetime1));//start time | |
$datetime2 = new DateTime(date('Y-m-d H:i:s', $datetime2));//end time | |
$interval = $datetime1->diff($datetime2); | |
$formats_array = array( "years" => "%Y", "months" => "%m", "days" => "%d", "hours" => "%H", "minutes" => "%i", "seconds" => "%s" ); | |
$return_time = ""; | |
foreach($formats_array as $key => $value ) { |
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
import android.support.annotation.Nullable; | |
import android.util.Base64; | |
import java.nio.ByteBuffer; | |
import java.security.SecureRandom; | |
import javax.crypto.Cipher; | |
import javax.crypto.spec.IvParameterSpec; | |
import javax.crypto.spec.SecretKeySpec; |