Skip to content

Instantly share code, notes, and snippets.

View javedbaloch4's full-sized avatar

Javed Baloch javedbaloch4

View GitHub Profile
@javedbaloch4
javedbaloch4 / Gmail Sign In CSS
Last active August 29, 2015 14:05
Gamil sign in page Source
<!Gmail Sign in CSS page By Javed Baloch>
<html>
<head>
<link rel="Shortcut icon" href="http://i61.tinypic.com/qp2zhu.jpg">
<title>Gmail</title>
<style>
#google
{
background-image:url(http://i62.tinypic.com/5wc7c5.jpg);
width:121px;
@javedbaloch4
javedbaloch4 / Andriod Robot CSS
Last active August 29, 2015 14:07
Andriod Robot Model CSS
<!Copy and Paste the Text into Notepad save Name.htm>
<html>
<head>
<title>Android Robot</title>
<style>
.android {
position: absolute;
left: 320px;
top: 230px;
}
@javedbaloch4
javedbaloch4 / Convert text to Hash
Last active August 29, 2015 14:22
Convert plan text into hash md5,crypt,sha1 in PHP
<?php
$txt = "Javed";
$t_md5 = md5($txt);
$t_sha1 = sha1($txt);
$t_crypt = crypt($txt);
echo $t_md5. "<br>" . $t_sha1 . "<br>" . $t_crypt ;
?>
<!-- This game created by Javed Baloch, 8-May-2016--->
<html>
<head>
<title>How Many Fingers</title>
<style type="text/css">
</style>
@javedbaloch4
javedbaloch4 / implode.php
Last active August 18, 2017 12:39
A great use of php Implode
<?php
/*
* By Muhammad Javed Baloch
** You can process data via $_POST or $_GET
** You could add secuirty functionalties suchas Escaping
*/
$data = array(
/**
* Casting bools to string
*/
$t = true;
$f = false;
// By default false returns nothing we need to type cast it to int to how 0
$f = (int) $f;
@javedbaloch4
javedbaloch4 / array-to-object.php
Created March 6, 2018 17:40
PHP - Convert Array into Object
<?php
// Array
$brands = ['electronics' => ['Dell','Hp','Compaq','Acer']];
// Encode Array into JSON
$json = json_encode($brands);
// Decode the json data, Object is ready
$object = json_decode($json);
const product = DATA.map(function(product) {
return (
<Col span={6} style={{ minHeight: "280px" }}>
<Card style={{ minHeight: "260px" }}>
<h2>{product.name}</h2>
<img src={product.img} alt={product.name} width={100} />
<p>
<strong>{product.price}</strong>
</p>
<p>{product.isAvailable ? "Available" : "Out of Stock"}</p>
@javedbaloch4
javedbaloch4 / React Simple Counter
Created January 29, 2019 16:32
Simple React Counter App with State full component.
import React from 'react';
const container = { width: '1000px', margin: '20px auto'}
class App extends React.Component {
constructor(props) {
super(props);
this.addOne = this.addOne.bind(this);
this.subOne = this.subOne.bind(this);
@javedbaloch4
javedbaloch4 / React Simple Toggle
Created January 29, 2019 17:14
Simple toggle app using react with its states.
import React from 'react';
const container = { width: '1000px', margin: '20px auto'}
class App extends React.Component {
constructor(props) {
super(props);
this.toggleVisibility = this.toggleVisibility.bind(this);
this.state = {