Skip to content

Instantly share code, notes, and snippets.

View byeblogs's full-sized avatar

Iam ByeBlog`s byeblogs

View GitHub Profile
@byeblogs
byeblogs / sketch-never-ending.md
Created December 12, 2017 08:08 — forked from Bhavdip/sketch-never-ending.md
Modify Sketch to never ending trial

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com

127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com

@byeblogs
byeblogs / gist:2edab0449970ce0ceca62bc65c6ef498
Created October 21, 2017 09:15
Problem With Upgrade PHP VERSION & CHANGE PATH !
To change the php path in mac Sierra, i did the steps mentioned but still when i run
which php
I still get
/usr/local/bin/php
I tried restarting terminal and even mac but it is still the same path. I have followed every steps
change bash_profile
export PATH="/Applications/XAMPP/xamppfiles/bin/php-7.0.15:$PATH"
@byeblogs
byeblogs / Blur Image Before Loaded !
Last active May 25, 2021 11:40
Blur Image Before Loaded
HTML
<div class="placeholder" data-large="https://cdn-images-1.medium.com/max/1800/1*sg-uLNm73whmdOgKlrQdZA.jpeg">
<img src="https://cdn-images-1.medium.com/freeze/max/27/1*sg-uLNm73whmdOgKlrQdZA.jpeg?q=20" class="img-small">
<div style="padding-bottom: 66.6%;"></div>
</div>
CSS
.placeholder {
@byeblogs
byeblogs / Check Validasi Email !
Last active May 25, 2021 11:40
Check Validasi Email
<?php header("Content-Type: text/plain");
function cekValidEmail($email) {
if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
list($user, $host) = explode('@', $email);
if (!checkdnsrr($host, 'MX')) {
return false;
} else {
return true;
}
} else {
@byeblogs
byeblogs / disqus_comment.js
Last active May 25, 2021 11:44
Disqus Comment
var disqus_shortname="bye_webster";
var disqus_url = "httP://bye-webster.blogspot.co.id";
(function () {
"use strict";
var get_comment_block = function () {
var block = document.getElementById('comments');
if (!block) {
block = document.getElementById('disqus-blogger-comment-block');
}
@byeblogs
byeblogs / Http Error Codes !
Last active May 25, 2021 11:44
Http Error Codes
HTTP Error Codes - 401 Access Denied , 403 Forbidden , 404 Not Found , 500 Internal Server Error
HTTP Error Code and their definition
100 - Continue.
101 - Switching protocols.
200 - OK. The client request has succeeded.
201 - Created.
202 - Accepted.
203 - Non-authoritative information.
204 - No content.
205 - Reset content.
@byeblogs
byeblogs / ~ Regex Password ~
Last active November 4, 2021 19:13
Regex Password
Minimum 8 characters at least 1 Alphabet and 1 Number:
"^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$"
Minimum 8 characters at least 1 Alphabet, 1 Number and 1 Special Character:
"^(?=.*[A-Za-z])(?=.*\d)(?=.*[$@$!%*#?&])[A-Za-z\d$@$!%*#?&]{8,}$"
Minimum 8 characters at least 1 Uppercase Alphabet, 1 Lowercase Alphabet and 1 Number:
"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,}$"
Minimum 8 characters at least 1 Uppercase Alphabet, 1 Lowercase Alphabet, 1 Number and 1 Special Character:
"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{8,}"
Minimum 8 and Maximum 10 characters at least 1 Uppercase Alphabet, 1 Lowercase Alphabet, 1 Number and 1 Special Character:
@byeblogs
byeblogs / Upload Image !
Last active May 25, 2021 11:45
Upload Images
$pathTo = "/Applications/XAMPP/xamppfiles/htdocs/zmg-development/upload_src/directory/";
$img_src = $_POST['img_src'];
$img_name = $_POST['img_name'];
$data = base64_decode(preg_replace('#^data:image/[^;]+;base64,#', '', $img_src));
$file = $pathTo . $img_name;
$success = file_put_contents($file, $data);
@byeblogs
byeblogs / .bash_profile
Created April 12, 2016 03:39 — forked from stephenll/.bash_profile
.bash_profile file on Mac OS X
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases.
# Much of this was originally copied from:
# http://natelandau.com/my-mac-osx-bash_profile/
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
@byeblogs
byeblogs / gist:632be3593b9790e6e119e30b4d53a1b0
Last active April 7, 2016 04:20
What Is Factory ! (Angular_JS)
/*
source : http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
<div ng-controller="MyCtrl">
{{hellos}}
</div>
*/