Skip to content

Instantly share code, notes, and snippets.

Avatar
🤔
hmm!

Mohammad Shahgolzadeh m2sh

🤔
hmm!
View GitHub Profile
View google-colab-pip-freeze.txt
absl-py==0.8.1
alabaster==0.7.12
albumentations==0.1.12
altair==4.0.0
asgiref==3.2.3
astor==0.8.1
astropy==3.0.5
atari-py==0.2.6
atomicwrites==1.3.0
attrs==19.3.0
View dnsmasq-sni-proxy.conf
bind-dynamic
bogus-priv
domain-needed
log-facility=-
local-ttl=60
address=/akadns.net/1.1.1.1
address=/akam.net/1.1.1.1
address=/akamai.com/1.1.1.1
address=/akamai.net/1.1.1.1
address=/akamaiedge.net/1.1.1.1
@m2sh
m2sh / unrar-multiple.sh
Last active Dec 11, 2018
Unrar Multiple files that end with 'part1.rar'
View unrar-multiple.sh
#/usr/bin/bash
for i in $(find -name "*.part1.rar"); do unrar x "$i";done;
@m2sh
m2sh / postman-deb.sh
Created Jan 9, 2018 — forked from SanderTheDragon/postman-deb.sh
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
View postman-deb.sh
#!/bin/sh
versionMaj="1"
versionMin="0"
versionRev="1"
version="$versionMaj.$versionMin-$versionRev"
echo "Removing old Postman tarballs"
rm -f $(ls Postman*.tar.gz)
View keybase.md

Keybase proof

I hereby claim:

  • I am m2sh on github.
  • I am m2sh (https://keybase.io/m2sh) on keybase.
  • I have a public key ASDypT4AHmIK78Fb52-1t8YvVckXkCw_1yUWo0LUyYWohQo

To claim this, I am signing this object:

@m2sh
m2sh / DOSpacesStorageServiceProvider.php
Last active Apr 16, 2021
How To Use Digitalocean Spaces as Laravel Cloud filesystems
View DOSpacesStorageServiceProvider.php
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Aws\S3\S3Client;
use League\Flysystem\AwsS3v3\AwsS3Adapter;
use League\Flysystem\Filesystem;
use Storage;
@m2sh
m2sh / Unix TimeStamp Behavior for CakePHP 3.x.md
Last active Jan 29, 2016
Unix Time stamp for created & modified field in database cakephp 3
View Unix TimeStamp Behavior for CakePHP 3.x.md

##UnixTimeStamp Behavior for CakePHP 3.x This is modified version of default CakePHP Timestamp Behavior but it save unix timestamp integer into created or modified fields
only changed return statement in timestamp method in default behavior

##Install Steps:

  1. Copy UnixTimestampBehavior.php in /src/Model/Behavior/ or in your plugin behavior
  2. Go to your table models in /src/Model/Table
  3. Add behavior in to Table initialize method :
    $this->addBehavior('UnixTimestamp');
  4. Done!
@m2sh
m2sh / Install PhalconPHP on CentOS.md
Last active Oct 11, 2015
install phalconPHP on CentOS (with direct admin installed)
View Install PhalconPHP on CentOS.md

If you have problem to build phalconPHP from source on CentOS With PHP 5.4 (and maybe Direct Admin control panel installed) you can try these steps to solve your problem.

  • First you must find the absolute path of phpize executable. so run this command :
    whereis phpize
  • Go to the path that you cloned source of phalcon, then cd into build path & your system architecture (for me is 64Bit):
    cd /path/to/cphalcon/build/64Bits/
  • Run phpize like this :
    /path/to/phpize
  • Go back to build directory:
    cd ../ or cd /path/to/cphalcon/build