Skip to content

Instantly share code, notes, and snippets.

View AliN11's full-sized avatar
😉
Focusing

Ali Nazari AliN11

😉
Focusing
View GitHub Profile
@ozh
ozh / composer-proxy.md
Created March 24, 2014 23:30
Using Composer behind a proxy

Define the proxy in the CLI :

$ export https_proxy='87.248.188.202:8080'
$ export http_proxy='87.248.188.202:8080'

Check proxy :

@alibo
alibo / iran-sanctions_blocker-sites.csv
Last active May 11, 2024 06:28
List of sites which block IPs come from Iran [UPDATING... (July 16, 2020)] #SANCTIONS
Title URI
Flurry by Yahoo https://dev.flurry.com/secure/signup.do
Google NikCollection https://dl.google.com/edgedl/photos/nikcollection-full-1.2.11.dmg
Bitbucket http://bitbucket.org/
SoftLayer http://softlayer.com/
VirtualBox http://download.virtualbox.org/virtualbox/5.0.16/VirtualBox-5.0.16-105871-OSX.dmg
Docker Hub https://hub.docker.com/
Oracle http://oracle.com/
Java http://java.com
Sun http://sun.com
@nasrulhazim
nasrulhazim / AppServiceProvider.php
Last active October 1, 2023 15:47
Laravel Base64 and Base64 Image Validator
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
@jasuperior
jasuperior / Rrray.js
Created December 26, 2017 15:24
Rrray(Relative Array): A concept using ES6 Proxies to construct a type of array whose values keep track of their sibling relationships. Also allows for circular/negative indexing.
class Rrray extends Array {
constructor(){
super(...arguments);
this.index = {}
return new Proxy(this, this.handler);
}
get handler () {
let $self = this;
return {
get(target, prop, proxy){
@lamngockhuong
lamngockhuong / ckfinder-authentication-configuration-for-laravel.md
Created February 6, 2018 16:04
[CKFinder Authentication Configuration for laravel 5] #laravel #ckfinder #ckeditor

Open and edit file 'ckfinder/config.php':

require dirname(__DIR__, 3) .'/vendor/autoload.php';
$app = require dirname(__DIR__, 3) . '/bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$kernel->handle($request = Illuminate\Http\Request::capture());

$config['authentication'] = function () {
 if (auth()-&gt;guest()) {
@lorisleiva
lorisleiva / readme.md
Last active December 26, 2021 13:09
Webpack aliases with Laravel Mix

Step 1: configure Webpack aliases

// webpack.mix.js

const mix = require('laravel-mix')
const path = require('path')

// ...
// resources/js/services/Form.js
import FormErrors from './FormErrors'
export default class {
constructor (initialData = {}, submitCallback = null) {
this._initialData = initialData
this._submitCallback = submitCallback
this.errors = new FormErrors()
@mzpqnxow
mzpqnxow / DiscordSOCKS5.md
Created August 24, 2020 04:45
Use SOCKS5 proxy with Discord on Linux

Using SOCKS5 Proxy With Discord on Linux

You may only need the environment or the command-line parameter to force Discord to use a proxy. It doesn't hurt to use both

So if you're behind a firewall and need to go through, e.g. an SSH dynamic port forward (a SOCKS5 channel inside an SSH session) you can use the following:

$ nohup ssh -D1080 proxy_server &
$ http_proxy=socks5://127.0.0.1:1080 https_proxy=socks5://127.0.0.1:1080 /opt/Discord/Discord --proxy-server="socks5://127.0.0.1:1080"
/* Basic specificity cheatsheet */
h1 {
/* Native elements have a weight of 0001. */
}
::after {
/* Pseudo-elements have a weight of 0001. */
}
@mhmda-83
mhmda-83 / excuses.json
Last active November 12, 2021 22:19
Devloper Excuses (extracted from http://developerexcuses.com/)
[
"The program has never collected that information",
"That wasn't in the original specification",
"The project manager told me to do it that way",
"There's currently a problem with our hosting company",
"Well done, you found my easter egg!",
"That feature would be outside of the scope",
"This code was not supposed to go in to production yet",
"The client must have been hacked",
"I'm still working on that as we speak",