Skip to content

Instantly share code, notes, and snippets.

View mrjosh's full-sized avatar
It's always coffee time

BetterCallJosh mrjosh

It's always coffee time
View GitHub Profile
@mrjosh
mrjosh / unixtime.php
Last active December 15, 2016 14:45
Get UnixTime With php
<?php
// Get UnixTime With php
// with this function , you can get the current unix time in php
function getUnixtime(){
$seconds = microtime(true); // true = float, false = weirdo "0.2342 123456" format
@mrjosh
mrjosh / install_codeception.sh
Last active December 31, 2016 11:16
Codeception installer bash script
if which codecept; then
echo ">>> You have already codeception <<<"
else
if which composer; then
composer global require codeception/codeception
@mrjosh
mrjosh / oh_my_bash_profile.sh
Last active January 1, 2017 20:28
Oh My Bash Profile
# Shell custom schema
# export PS1='\W > '
PS1='\[\033[01;34m\]\W > \033[0m'
# Artisan short commands
alias art='php artisan'
alias tinker='php artisan tinker'
# Php Serve alias serve
@mrjosh
mrjosh / laravel_queue_service_installer.sh
Last active December 31, 2016 11:50
Laravel queue service installer
#!/bin/bash
# @author Alireza Josheghani <[email protected]>
# @since 26 Dec 2016
# @package Laravel queue service installer
# download the source form github
if [ ! -f develop.tar.gz ]; then
wget https://github.com/iamalirezaj/laravel_queue_service/archive/develop.tar.gz
fi
@mrjosh
mrjosh / php7_installer.sh
Created September 26, 2017 08:31
PHP 7 Installer
#!/bin/bash
wget http://de1.php.net/get/php-7.0.0.tar.bz2/from/this/mirror
tar -xvjf mirror
cd php-7.0.0/
./configure \
--with-readline \
--enable-pcntl \
--with-gettext \
--enable-phpdbg \
--enable-phpdbg-webhelper \
@mrjosh
mrjosh / Round_white_button_drop_shadow.xml
Created January 16, 2019 00:43 — forked from arvkmr/Round_white_button_drop_shadow.xml
Android round white button with drop shadow
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<layer-list>
<item>
<shape android:shape="oval">
<gradient
android:startColor="#FF000000"
android:endColor="#00000000"
@mrjosh
mrjosh / fix-steam-microphone-permission-macOS.md
Last active June 19, 2021 19:00
How to: Fix Steam Voice Chat in macOS Mojave and Catalina

How to fix steam microphone permission macOS

Step 1: Disable The System Integrity

  • Disable The System Integrity for access the relevant system database.

Reboot your Mac and hold Cmd+R on startup. This will bring up the Recovery Mode. Open Utility -> Terminal from the menu bar and type csrutil disable Reboot.

Step 2: Manually add permission for Steam to access the microphone.

Remove all <none> images on docker:
```bash
docker rmi -f $(docker images | grep "<none>" | awk "{print \$3}")
```
@mrjosh
mrjosh / settings.json
Created April 3, 2020 18:46
VSCode settings Json file
{
"go.formatTool": "goimports",
"go.useLanguageServer": true,
"files.exclude": {
"**/.idea": true
},
"workbench.startupEditor": "none",
"editor.fontSize": 16,
"editor.wordWrap": "on",
"window.zoomLevel": 0,
@mrjosh
mrjosh / unixhttpc.go
Created April 7, 2020 17:49 — forked from teknoraver/unixhttpc.go
HTTP over Unix domain sockets in golang
package main
import (
"context"
"flag"
"fmt"
"io"
"net"
"net/http"
"os"