Skip to content

Instantly share code, notes, and snippets.

Bye Webster bye-webster

Block or report user

Report or block bye-webster

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View PATH SERVER
Examples for: https://(www.)example.com/subFolder/myfile.php?var=blabla#555
// ======= PATHINFO ====== //
$x = pathinfo($url);
$x['dirname'] 🡺 https://example.com/subFolder
$x['basename'] 🡺 myfile.php?
$x['extension'] 🡺 php?k=blaa#12345 // Unsecure! also, read my notice about hashtag parts
$x['filename'] 🡺 myfile
// ======= PARSE_URL ====== //
View MongoDB Notes
---------------------------------
# installation
download mongodb
https://www.mongodb.com/download-center
select
"Community server" tab
> "Windows
> download
View ffmpeg screen recorder audio + video
I've done. Get an impressive result for what is free.
So I think it'd be useful to share with people here.
Please note that I'm no expert in ffmpeg. I just looking at the link Marco gave me then do a bit more explore.
Install ffmpeg, in my case, Mac OS X, I install via brew
# brew install ffmpeg
Looking for my device id, audio, video
In my case, there were [1] and [1] and it is depend on your setting.
@bye-webster
bye-webster / using_external_libraries_in_reactjs.txt
Created Dec 9, 2018
Example how to using external libraries in react js..
View using_external_libraries_in_reactjs.txt
Try following steps:
including the external js file link in your /public/index.html
use the external library with prefix window.
for example, JQuery.
put following line in your /public/index.html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
use it in your project:
window.$("#btn1").click(function(){
View data_news.json
{
"result": [
{
"portal_name": "ABC News",
"portal_init": "abc-news",
"portal_image": "https://s.abcnews.com/assets/images/apple-touch-icons/touch-icon-ipad-retina.png"
},
{
"portal_name": "CNN",
"portal_init": "cnn",
@bye-webster
bye-webster / Setting-MySql-Docker.txt
Last active Sep 18, 2018
The server requested authentication method unknown to the client..
View Setting-MySql-Docker.txt
you can check by "docker inspect name_of_mysql_1" and then you can use IP of Gateway which is "172.18.0.1"
"NetworkID": "05f4c08c374b61334709dc8ce4b5e5cad8b94e09c27b66b0ed64c89c8d585f1f",
"EndpointID": "4830e8ae5f13cc983252374e1955f8731490e561603996e6c8265ccf79dea73b",
"Gateway": "172.18.0.1",
"IPAddress": "172.18.0.3",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:12:00:03",
@bye-webster
bye-webster / diff_range_of_hours.js
Created Aug 31, 2018
Check diff range of hours, minutes, second in Javascript..
View diff_range_of_hours.js
var startTime = moment('12:00:01', 'hh:mm:ss a');
var endTime = moment('13:00:10' , 'hh:mm:ss a');
var totalHours = (endTime.diff(startTime, 'hours'));
var totalMinutes = endTime.diff(startTime, 'minutes');
var clearMinutes = totalMinutes % 60;
console.log(totalHours + " hours and " + clearMinutes + " minutes");
@bye-webster
bye-webster / data-countries.json
Last active Aug 28, 2018
Just example of json of Countries..
View data-countries.json
[
{ "name" : "Afghanistan", "code" : "AF"},
{ "name" : "Åland Islands", "code" : "AX"},
{ "name" : "Albania", "code" : "AL"},
{ "name" : "Algeria", "code" : "DZ"},
{ "name" : "American Samoa", "code" : "AS"},
{ "name" : "AndorrA", "code" : "AD"},
{ "name" : "Angola", "code" : "AO"},
{ "name" : "Anguilla", "code" : "AI"},
{ "name" : "Antarctica", "code" : "AQ"},
@bye-webster
bye-webster / data-airports.json
Created Aug 28, 2018
Just example of json of Airports..
View data-airports.json
This file has been truncated, but you can view the full file.
[
{
"code": "AAA",
"lat": "-17.3595",
"lon": "-145.494",
"name": "Anaa Airport",
"city": "Anaa",
"state": "Tuamotu-Gambier",
"country": "French Polynesia",
You can’t perform that action at this time.