-i
- ignore errors
-c
- continue
-t
- use video title as file name
--extract-audio
- extract audio track
<?php | |
// Reference https://codebriefly.com/unique-alphanumeric-string-php/ | |
function unique_code($limit) | |
{ | |
return substr(base_convert(sha1(uniqid(mt_rand())), 16, 36), 0, $limit); | |
} | |
echo unique_code(8); |
DELIMITER $$ | |
CREATE DEFINER=`root`@`localhost` FUNCTION `COMPARE_STRING`( s1 text, s2 text) RETURNS int(11) | |
DETERMINISTIC | |
BEGIN | |
DECLARE s1_len, s2_len, i, j, c, c_temp, cost INT; | |
DECLARE s1_char CHAR; | |
DECLARE cv0, cv1 text; | |
SET s1_len = CHAR_LENGTH(s1), s2_len = CHAR_LENGTH(s2), cv1 = 0x00, j = 1, i = 1, c = 0; | |
IF s1 = s2 THEN | |
RETURN 0; |
Billy Chia Billy Chia | |
E.164 is the international telephone numbering plan that ensures each device on the PSTN has globally unique number. | |
This is what allows phone calls and text messages can be correctly routed to individual phones in different countries. | |
E.164 numbers are formatted [+] [country code] [subscriber number including area code] and can have a maximum of fifteen digits. | |
Examples of E.164 Numbers | |
E.164 Format Country Code Country Subscriber Number | |
+14155552671 1 US 4155552671 | |
+442071838750 44 GB 2071838750 |
<?php | |
namespace App\Classes\Iyzico; | |
use Iyzipay; | |
use Iyzipay\Model; | |
use Iyzipay\Options; | |
use Iyzipay\Request; | |
/** |
const WebSocket = require('ws') | |
const ws = new WebSocket('wss://s1.ripple.com') | |
const wss = new WebSocket.Server({ port: 8011 }) | |
wss.on('connection', function connection(c) { | |
let sendmessages = true | |
setTimeout(function () { | |
sendmessages = false |
# The initial version | |
if [ ! -f .env ] | |
then | |
export $(cat .env | xargs) | |
fi | |
# My favorite from the comments. Thanks @richarddewit & others! | |
set -a && source .env && set +a |
<?php | |
/** | |
* gets the current post type in the WordPress Admin | |
*/ | |
function get_current_post_type() { | |
global $post, $typenow, $current_screen; | |
//we have a post so we can just get the post type from that | |
if ( $post && $post->post_type ) { | |
return $post->post_type; |
<?php | |
/** | |
* Reference/source: http://stackoverflow.com/a/1464155/933782 | |
* | |
* I want a short alphanumeric hash that’s unique and who’s sequence is difficult to deduce. | |
* I could run it out to md5 and trim the first n chars but that’s not going to be very unique. | |
* Storing a truncated checksum in a unique field means that the frequency of collisions will increase | |
* geometrically as the number of unique keys for a base 62 encoded integer approaches 62^n. | |
* I’d rather do it right than code myself a timebomb. So I came up with this. | |
* |