Skip to content

Instantly share code, notes, and snippets.

reshadman /
Created December 12, 2020 20:52 — forked from midweste/
Install sentry on Ubuntu 20 with Snap
# need to have at least 2.5GB of memory of this install may fail - see docs
# todo 13:52:28 [WARNING] sentry.utils.geo: settings.GEOIP_PATH_MMDB not configured.
# sudo apt-get install -y postgresql postgresql-contrib redis
sudo apt-get install -y postgresql redis

Thing you should consider before the beginning:

  • Use a linux based distro as your daily O.S preferrably Ubuntu if you don't know what Ubuntu is search for it.
  • Install Ubuntu you would never come back to Windows :D
  • Then put effort on learning O.S package managers like apt for Ubuntu, yum for CentOS etc.
  • Learn to work with terminal, learn how bash scripts work but don't put too much effort on them just as enough as you know how they work
  • Download PHPStorm (Acts like Visual Studio but it is for PHP World)
  • Learn to work with one additional Editor such as Sublime Text or "Visual Studio Code -- it is different from Visual Studio--"

Start learning PHP / Javascript / CSS / MySQL

<div id="jobinjaEmbedded--1526362404115">
<script type="text/javascript">
window.jobinjaEmbedded = window.jobinjaEmbedded || {q: []};
"slug": "zarinpal",
"containerId": "jobinjaEmbedded--1526362404115",
"baseUrl": "",
"linkColor": "#303030",
"linkHoverColor": "#d5aa1f",
"cta": false,
<script type="text/javascript">
window.jobinjaEmbedded = window.jobinjaEmbedded || {q: []};
"slug": "benis-flower-1",
"containerId": "jobinjaEmbedded--1526362404115",
"baseUrl": "",
"linkColor": "#EC1D3D",
"linkHoverColor": "#b71730",
"cta": true,
"header": true,
reshadman /
Created April 21, 2018 18:56 — forked from cecilemuller/
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two main modes to run the Let's Encrypt client (called Certbot):

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80).

In the following, we're setting up HTML is served from /var/www/mydomain, and challenges are served from /var/www/letsencrypt.

<table class="ui striped celled table">
<th>نام پکیج</th>
<th class="right aligned">تاریخ ایجاد</th>
<th class="center aligned">وضعیت</th>
<th>فعال در قسمت</th>
<th class="right aligned">عملیات</th>
class UserController {
public function postCreate(UserCreatorService $userCreatorService, Request $request)
$creationNeeds = new CreationValueObject;
$creationNeeds->username = $request->username;
$creationNeeds->password = $request->password;
$creationNeeds->email = $request->email;
require_once 'recipe/common.php';
// A deploy script for for used at
// The script creates a folder for each one of your releases
// and makes them zero downtime deploys, this is tuned for laravel
// but the logic can be used for anything which needed transactional folder
// based changes.
// As some of the npm packages are banned in our server ISP we use
// a combination of shadowsocks and polipo(for reversing https and socks)
reshadman / action.js
Last active November 1, 2015 11:57
Processing Laravel jobs from node.
'use strict';
var redis = require('redis');
var LaravelJob = require('./index');
// Create laravel job instance
var job = new LaravelJob({});
// Set handlers on the job
job.registerHandler("Jobinja\\Jobs\\ExampleJob", function(job, payload) {
reshadman /
Created May 3, 2015 17:15
Simple loop in programming languages -- for permance benchmarking of a WHILE LOOP --
public class Loop {
public static void main(String[] args)
Integer total = 500000000;
Integer chunk = 50000000;
Integer i = 0;