Skip to content

Instantly share code, notes, and snippets.

View Livin21's full-sized avatar
💻
Coding

Livin Livin21

💻
Coding
View GitHub Profile
[
{
"name": "Livin",
"surname": "Mathew",
"role": "Co-Founder",
"image": "https://pimg-guru.com/1/848/1848078/livin_9ee335cb-2d64-410c-9c55-196082bce9dc.jpg",
"title": "CIO",
"country": "India",
"city": "Kochi",
"links": {
@marcusmotill
marcusmotill / BitmapUtils.kt
Created March 12, 2016 18:36
Image compression for Android in Kotlin
class BitmapUtils {
companion object
}
fun BitmapUtils.Companion.getCompressedImage(pathName: String, scalingLogic: ImageView.ScaleType): String {
val options = BitmapFactory.Options()
options.inJustDecodeBounds = true
BitmapFactory.decodeFile(pathName, options)
options.inJustDecodeBounds = false
val dstWidth: Double = ((options.outWidth.toDouble() / (options.outWidth.toDouble() * options.outHeight.toDouble())) * 1000) * options.outWidth.toDouble()
@Livin21
Livin21 / bootStrapUbuntu.sh
Last active November 26, 2015 08:34
Boot Strapping Ubuntu
#List of Programs:
#XDM, Wine, Dex2jar, traceroute, virtualbox, android-tools-adb, #sublime2, Telegram, JAVA 7, VLC, Gimp, apache2, php5, libapache2-mod-#php5, php5-mcrypt, mysql-server, libapache2-mod-auth-mysql, php5-#mysql, google chrome and media plugin extras
sudo add-apt-repository -y ppa:videolan/stable-daily
sudo add-apt-repository -y ppa:otto-kesselgulasch/gimp
sudo add-apt-repository -y ppa:maarten-baert/simplescreenrecorder
sudo add-apt-repository -y ppa:noobslab/apps
sudo add-apt-repository -y ppa:ubuntu-wine/ppa
sudo apt-get update
@hootlex
hootlex / laravellocal.md
Last active April 19, 2024 10:52
Run laravel project locally

##Windows users:

cmder will be refered as console

##Mac Os, Ubuntu and windows users continue here:

  • Create a database locally named homestead utf8_general_ci
@homaily
homaily / gist:8672499
Last active April 15, 2024 05:57
Regex to validate saudi mobile numbers

السلام عليكم ، هذا كود ريجيكس بسيط للتحقق من صحة أرقام الجوالات السعودية ، يقوم الريجيكس بالتحقق من مفتاح الدولة ، مفتاح شركة الإتصالات لضمان صحة النص المدخل .

Hello, this is a simple regex to validate saudi mobile numbers, the code will validate country code, telecome company code and make sure the tested sting is correct .

/^(009665|9665|\+9665|05|5)(5|0|3|6|4|9|1|8|7)([0-9]{7})$/

Regex Breakdown - شرح الكود