Skip to content

Instantly share code, notes, and snippets.

View JunaidQadirB's full-sized avatar
🎯
Social Media Fasting

Junaid Qadir JunaidQadirB

🎯
Social Media Fasting
View GitHub Profile
@JunaidQadirB
JunaidQadirB / adb_usb.ini
Created October 9, 2015 15:36
When Xiomi device does not show in adb devices, Copy to ~/.android/adb_usb.ini
0x2717
0x0bb4
<%
SUB reacExcelFile(fileName)
'initialize variables
Dim objConn, strSQL
Dim x
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "DRIVER={Microsoft Excel Driver (*.xls)}; IMEX=1; HDR=NO; "&_
"Excel 8.0; DBQ=" & Server.MapPath(fileName) & "; "
strSQL = "SELECT * FROM A1:G1000"
@JunaidQadirB
JunaidQadirB / fonts.md
Last active May 19, 2017 13:19
Fonts that support Balochi UniBal

Google Fonts That Fully Support UniBal Script

The following fonts fully support UniBal script.

Serif Fonts

Preview

@JunaidQadirB
JunaidQadirB / add_display_resolution.sh
Created April 1, 2018 20:20
Add new screen resolution
#!/bin/bash
# This detects the connected display
# xrandr | grep "\sconnected"
DISPLAY_ID="eDP-1"
xrandr --newmode "1280x720_60.00" 74.48 1280 1336 1472 1664 720 721 724 746
xrandr --addmode $DISPLAY_ID 1280x720_60.00
xrandr --output $DISPLAY_ID --mode 1280x720_60.00
@JunaidQadirB
JunaidQadirB / autocomplete.js
Last active April 15, 2018 17:01
Customized jQuery UI Autocomplete Widget: List Items with description
$("#tags").autocomplete({
source : availableTags,
select : function(event, ui) {
itemTitleDesc = split(ui.item.value);
if (is_array(itemTitleDesc)) {
itemTitle = itemTitleDesc[0];
if (itemTitleDesc.length > 1) {
itemDesc = itemTitleDesc[1];
itemDesc = itemDesc.replace(")", "");
}
@JunaidQadirB
JunaidQadirB / .aliases
Created May 21, 2020 17:15
Aliases I use on my *nix machines
source ~/.dotfiles/.aliases_projects
alias art='php artisan'
alias arts='art serve'
alias artm='art migrate'
alias artms='art migrate:refresh --seed'
alias artrl='art route:list'
alias artclear='art clear-compiled &&
art view:clear &&
art config:clear &&
art route:clear &&
@JunaidQadirB
JunaidQadirB / git_ver.sh
Last active June 16, 2020 20:33
This shell script gives you the ability to get your git the version as well as the commit hash pretty easily, via two handy utility functions
#!/bin/bash
#Get Version
version() {
git ls-remote --tags $1 | awk -F/ '{ print $3 }' | tail -n1
}
# Get commit hash
hash() {
git ls-remote --tags $1 | awk -F/ '{ print substr($1,0,7) }' | tail -n1
}
<?php
/**
*
* @link https://github.com/codex-team/editor.js/issues/676#issuecomment-587462314
*/
namespace App\Traits;
@JunaidQadirB
JunaidQadirB / git-release
Created January 4, 2021 18:08
Create and auto-increment Release versions on GitHub
#!/bin/bash
Green='\033[1;32m'
Red='\033[0;31m'
NC='\033[0m' # No Color
Yellow='\033[0;33m'
should_bump=true
bump_major()
@JunaidQadirB
JunaidQadirB / main.yml
Created January 4, 2021 18:23
Github Action to deploy a Laravel App from release tag
name: CD
on:
release:
types:
- released
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2