Skip to content

Instantly share code, notes, and snippets.

View secmohammed's full-sized avatar
:atom:

Mohammed Osama secmohammed

:atom:
View GitHub Profile
@madi-madi
madi-madi / nuxt and laravel nginx deploy.txt
Created January 1, 2021 19:44
DEPLOYING LARAVEL AND NUXT ON LINUX
DEPLOYING LARAVEL AND NUXT ON LINUX
SERVER – Start to FInish
Buy a server on Digital Ocean
1. Go to Digital Ocean https://m.do.co/c/5b428a74fc09 to sign up. Use this link to get
$100 in free credit.
2. Create a new Project
3. Create a new Droplet and OS
a. Click on “Get started with a Droplet”.
b. Choose Ubuntu LTS
c. Select plan ($5/mo is ok)
@carlok
carlok / bitbucket-pipelines.yml
Created March 28, 2020 17:14
How to force BitBucket to push a Docker image to AWS ECR after a git tag
#image: atlassian/default-image:2
image: python:3.7.3
pipelines:
tags:
'v*': # the tag is "vSomthing" like "v-0.4.2"
- step:
name: Build docker image and push to AWS ECR
services:
- docker
@1mursaleen
1mursaleen / laravel laravel-echo laravel-echo-server private channel authentication problems
Last active December 12, 2023 12:25
Common Problems faced while setting up private channels with laravel-echo & laravel-echo-server.
I'll start with the basics and proceed to addressing the common problems
faced while setting up private channels with laravel-echo & laravel-echo-server.
If you are getting these errors while setup; 401, 403, 419 etc, as I did in my experience.
this gist will help you fix these errors.
Although this gist addresses common problems of laravel-echo-server setup, some problems are similar with Pusher setup.
So it might also be useful if you're having problems with setting up Pusher with Echo.
I'll try to cover eveything and try to use appropriate highlighting to single out each common problem.
@rluena
rluena / chai-http.js
Last active February 21, 2019 20:53
Sending form data using chai-http
// Sending form data
chai = require('chai');
chaiHttp = require('chai-http')
chai.use(chaiHttp);
stripe_request = chai.request('https://api.stripe.com');
stripe_request.post('/v1/tokens')
.set('content-type', 'application/x-www-form-urlencoded')
.send({
@c16a
c16a / main.go
Created August 6, 2017 13:41
Concurrent MySQL with Golang
package main
import "database/sql"
import (
"fmt"
_ "github.com/go-sql-driver/mysql"
"github.com/satori/go.uuid"
"math/rand"
"sync"
)
@vincicat
vincicat / Guide.md
Created April 4, 2017 16:37
React Native Router Flux - Little Guide on Tabs

Intro

This is one of the great navigation library, just with too little doc on customization, and unfortunately tab is one of them.

Example

<Scene key="myTabBar" tabs={true} hideNavBar tabBarStyle={style.tabBarStyle}>
  <Scene 
    key="myTab" 
    title="My Tab" 
 icon={MyTabIcon} 
@tixastronauta
tixastronauta / facebook_leads.md
Last active July 22, 2024 05:23
Receiving Facebook Leads on a Webhook
@OlegIlyenko
OlegIlyenko / Event-stream based GraphQL subscriptions.md
Last active July 4, 2024 07:31
Event-stream based GraphQL subscriptions for real-time updates

In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.

Conceptual Model

At the moment GraphQL allows 2 types of queries:

  • query
  • mutation

Reference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.

@scrubmx
scrubmx / sublime-phpcs.md
Last active June 27, 2021 14:14
Setup Phpcs for Sublime Text

Setup Phpcs for Sublime Text

This plugin adds PHP CodeSniffer, PHP Code Beautifier and Fixer, PHP Coding Standards Fixer, the PHP Linter, PHP Mess Detector, Scheck support to Sublime Text.

For more information about this plugin such as features, installation requirements etc, please see: http://benmatselby.github.io/sublime-phpcs

Prerequisites

  • Download and install composer
curl -sS https://getcomposer.org/installer | php 
@josephspurrier
josephspurrier / structs_interface.go
Last active March 21, 2024 08:11
Golang - Understand Structs and Interfaces
// Also available at: https://play.golang.org/p/yTTpB5gB6C
package main
import (
"fmt"
)
// *****************************************************************************
// Example 1 - Struct vs Struct with Embedded Type