View ssllamp.sh
This file contains 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
#!/usr/bin/env bash | |
RAND=$(openssl rand -hex 12) | |
TEMP="/opt/lampp/temp/$RAND" | |
mkdir $TEMP | |
cd $TEMP |
View passwordStrength.js
This file contains 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 React, { Component } from 'react' | |
const PasswordPower = (props) => { | |
const tests = [ | |
[/^(?=.*[\d])(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*])[\w!@#$%^&*]{8,}$/, 'strong password', '✓', '#a5dc86' , 0], | |
[/^((?=.*[a-z])(?=.*[A-Z])(?=.*[0-9]).{6,})$/, "medium", "!", '#f8bb86' , 16], | |
[/^[a-zA-Z0-9\-\_!@#$%^&*\.\(\)]{1,}$/, "week password", "❌", '#f27474' , 50] | |
] | |
if (props.password) { | |
for (let test of tests) { |
View FileUpload.js
This file contains 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 React, { Component } from 'react' | |
import { Upload, Form, Icon } from "antd"; | |
const formItemLayout = { | |
labelCol: { | |
xs: { span: 24 }, | |
sm: { span: 5 }, | |
}, | |
wrapperCol: { | |
xs: { span: 24 }, | |
sm: { span: 18 }, |
View php
This file contains 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 | |
$connection = r\connect("127.0.0.1" , null , "myApp") ; | |
$point = r\point((float) $request->pickup["lng"] , (float) $request->pickup["lat"]); | |
$data = r\table("connected")->getNearest($point , ["index" => "last_location"])->filter( | |
r\row("doc")("service_id")->eq( $request->service ) | |
)->run($connection) ; | |
View Random.php
This file contains 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 | |
namespace Itx\Utilities ; | |
class Random | |
{ | |
public static function guid() | |
{ | |
return sprintf( | |
'%s-%04x-%04x-%04d-%s', | |
self::string(8), |
View Api.dart
This file contains 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 'dart:async' ; | |
import 'package:shared_preferences/shared_preferences.dart'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:http/http.dart' as http; | |
class Api | |
{ | |
SharedPreferences prefs ; | |
String locale = "en" ; | |
Api() { this.init(); } |
View Ip.php
This file contains 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 | |
class Ip | |
{ | |
public function get() | |
{ | |
if (isset($_SERVER['HTTP_CLIENT_IP'])) | |
{ | |
$ip=$_SERVER['HTTP_CLIENT_IP']; | |
} | |
elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) |
View arabic_soundex.php
This file contains 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 | |
/** | |
this is a simple method , which will return soundex of transliterated arabic string | |
*/ | |
function arSoundex($string) | |
{ | |
// remove any pounctions and any space etc .. | |
$string = preg_replace("/\\p{P}|\\p{M}/u", "" , $string); | |
$chars = array( | |
"ا"=>"أإاآ" , |