Skip to content

Instantly share code, notes, and snippets.

View YasienDwieb's full-sized avatar

Yasien Dwieb YasienDwieb

View GitHub Profile
@YasienDwieb
YasienDwieb / nlargest.sh
Last active October 20, 2019 12:43
Find largest files or directories
#!/bin/bash
if [ $# -eq 0 ]
then
echo 'Usage:largest.sh file|folder path NUMBEROFRECORDS'
exit
fi
DEST=$2
NUMBEROFRECORDS=10
if [ -n $3 ]
@YasienDwieb
YasienDwieb / dev-progs.sh
Created September 30, 2018 11:21
Development programs installation script
#!/bin/sh
#Developement programs installation script
#Author: Yasien
sudo apt update
#sublime
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
@YasienDwieb
YasienDwieb / linux-provisioning.sh
Last active April 23, 2019 21:57
Linux Packages installation assistant
#!/bin/bash
#This script works on preparing a clean linux distro to be ready
#for being used for developemnt
#Author: Yasien
while [ true ];do
#Getting input from user about desired operation
cat << EOT
Please Choose an option:
@YasienDwieb
YasienDwieb / ImageUpload.vue
Created November 20, 2017 07:49
A Vue component that can be used within form to add image upload and thumbnail view functionality
<template>
<div>
<span class="btn btn-file">
<i class="fa fa-camera"></i>
<input name="image" type="file" @change="onFileChange" accept="image/*">
</span>
<div v-if="uploadImage" class="replyImage">
<img :src="uploadImage" />
<button @click="removeImage"><i class="fa fa-close"></i></button>
</div>