First, Lets find out what version of PHP we're running (To find out if it's the default version).
To do that, Within the terminal, Fire this command:
which php
#!/usr/bin/env ruby | |
# encoding: UTF-8 | |
@dot_cycle = ['⣾','⣽','⣻','⢿','⡿','⣟','⣯','⣷'] | |
#braille random: 0x2800 - 0x28ff | |
@z_arrow = ['←','↖','↑','↗','→','↘','↓','↙'] | |
@z_b = ['b','ᓂ','q','ᓄ'] | |
@z_d = ['d','ᓇ','p','ᓀ'] |
<?php | |
// copied from python code at https://stackoverflow.com/a/23221582/3103058 | |
function base32_decode($key) { | |
// https://www.php.net/manual/en/function.base-convert.php#122221 | |
$key = strtoupper($key); | |
list($t, $b, $r) = array("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", "", ""); | |
foreach(str_split($key) as $c) | |
$b = $b . sprintf("%05b", strpos($t, $c)); | |
foreach(str_split($b, 8) as $c) | |
$r = $r . chr(bindec($c)); |
<?php | |
define('OAUTH2_CLIENT_ID', ''); | |
define('OAUTH2_CLIENT_SECRET', ''); | |
$authorizeURL = 'https://github.com/login/oauth/authorize'; | |
$tokenURL = 'https://github.com/login/oauth/access_token'; | |
$apiURLBase = 'https://api.github.com/'; | |
session_start(); |
public static void exportAllDatabases(final Context context) { | |
Log.d(LOG_TAG, "exportAllDatabases: "); | |
File sd = Environment.getExternalStorageDirectory(); | |
if (sd.canWrite()) { | |
final File[] databases = new File(context.getFilesDir().getParentFile().getPath() + "/databases").listFiles(); | |
for (File databaseFile: databases) { | |
final String backupFilename = databaseFile.getName() + "-" + Build.SERIAL + | |
"-" + System.currentTimeMillis() + ".db"; | |
File backupFile = new File(sd, backupFilename); | |
FileChannel inputChannel = null; |
<?php | |
/* | |
* Script that shows how to insert a basepath on HTML tags | |
* It looks for link, script and img tags that do not contain the | |
* determined basepath or a external URL | |
*/ | |
// BasePath to insert in string when necessarry | |
$basePath = "/project/site/"; | |
$escapedBasePath = str_replace("/", "\/", $basePath); |
<?php | |
/** | |
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved. | |
* @license GNU General Public License version 2 or later; see LICENSE | |
*/ | |
namespace Joomla\Data; | |
use Psr\Cache\CacheInterface; |
<? | |
/* This file is released under the GPL, any version you like | |
* | |
* PHP PSD reader class, v1.3 | |
* | |
* By Tim de Koning | |
* | |
* Kingsquare Information Services, 22 jan 2007 | |
* | |
* example use: |
joomla | |
``` | |
index | |
| | |
v | |
routing | |
| | |
v | |
controller <---- models <-- table & form | |
| | |