Skip to content

Instantly share code, notes, and snippets.

View sheryarshirazi's full-sized avatar
👋
Out sick

Sheryar Shirazi sheryarshirazi

👋
Out sick
  • karachi, pakistan
View GitHub Profile
@sheryarshirazi
sheryarshirazi / Person.jsx
Created April 15, 2018 15:45
React JS 16, Fragments Example
import React from 'react';
const Fragment = React.Fragment;
const person = (props) => {
return (
<Fragment>
<p>Name: {props.name}.</p>
<p>Age: {props.age}</p>
</Fragment>
);
#!/data/data/com.termux/files/usr/bin/bash
# 4/05/2017 Gabi Tiplea
echo -e "Updating default packages\n"
apt update && apt -y upgrade
echo -e "Requesting acces to storage\n"
termux-setup-storage
sleep 5
function isUnique (str) {
for (let i = 0; i < str.length; i++) {
let tmp1 = str[i];
for (let j = i; j < str.length; j++) {
if (i == j) {
continue;
}
let tmp2 = str[j];
if (tmp1 === tmp2) {
return false
// directive JS
(function() {
'use strict';
angular
.module('app')
.directive('oneWayBind', oneWayBind);
oneWayBind.$inject = [];
function oneWayBind() {
@sheryarshirazi
sheryarshirazi / artisan.txt
Last active April 14, 2017 19:39
Laravel | artisan commands
# Laravel 5.4 From Scratch:
@sheryarshirazi
sheryarshirazi / .gitignore
Created June 10, 2016 15:09
php application
# PHP framework and composer files
vendor
# sublime editor files
*.sublime*
SideBarEnhancements.json
@sheryarshirazi
sheryarshirazi / .bash_profile
Created June 2, 2016 09:21
Git bash profile
export PS1='\W$(__git_ps1 "(%s)") > '
@sheryarshirazi
sheryarshirazi / .gitconfig
Created June 2, 2016 09:20
Git global config
[user]
name = Sheryar Shirazi
email = sheryarshirazi@gmail.com
[core]
editor = 'c:/program files/sublime text 3/subl.exe' -w
excludesfile = c:/Users/sheryar shirazi/.gitignore_global
[alias]
st = status
co = checkout
ci = commit
@sheryarshirazi
sheryarshirazi / .gitignore_global
Created June 2, 2016 09:19
Git ignore global
# Windows image file caches
Thumbs.db
# Folder config file
Desktop.ini
# Recycle.Bin used on files shares
$RECYCLE.BIN/
@sheryarshirazi
sheryarshirazi / getConstantArrayNames.php
Created April 20, 2016 20:13
Find Constant Array key Names
<?php namespace yourName;
/**
* return constant array key
* @param constant $const constant array name
* @param int $index index of constant array key value (in my case its int)
* @return string key name (string in my case)
*/
function getConstantArrayNames($const, $index) {
$x = get_defined_constants(true);