Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Irfaq Syed irazasyed

View GitHub Profile
@irazasyed
irazasyed / 1-dnsmasq-dnscrypt-proxy-setup.md
Last active Apr 4, 2019
How to Setup dnsmasq with dnscrypt-proxy and Cloudflare DNS on macOS
View 1-dnsmasq-dnscrypt-proxy-setup.md

How to Setup dnsmasq with dnscrypt-proxy and Cloudflare DNS on macOS

Using Laravel Valet for localhost development, So it installs dnsmasq with it. dnsmasq runs on port 53, The default DNS port. So we setup dnscrypt-proxy on port 5300 with the default config files in this gist.

dnscrypt-proxy Installation

brew install dnscrypt-proxy
View card-popup-effect.css
.card {
transition: 0.5s;
backface-visibility: hidden;
transform: translateZ(0);
}
.card:hover {
box-shadow: 0 30px 70px #000;
transform: scale3d(1.05, 1.05, 1.05);
}
@irazasyed
irazasyed / laravel-scheduler.md
Created Aug 12, 2018
Laravel Scheduler Manual Simulation
View laravel-scheduler.md

Simulate Laravel Scheduler Manually

This command will execute every 60 seconds which will trigger your Laravel schedules in 1 min range.

while true; do php artisan schedule:run; sleep 60; done
@irazasyed
irazasyed / dark-youtube.js
Last active Apr 3, 2018
User-Script: YouTube Dark & Wide Mode.
View dark-youtube.js
// ==UserScript==
// @name Dark Wide YouTube
// @namespace DWYT
// @version 1.0
// @description Dark Wide YouTube
// @author Syed I.R.
// @match https://*.youtube.com/*
// @require https://raw.githubusercontent.com/madmurphy/cookies.js/master/cookies_min.js
// @grant none
// @noframes
@irazasyed
irazasyed / binance-registration-workaround.md
Created Jan 6, 2018
Binance Registration Work-Around
View binance-registration-workaround.md

Binance Registration Work-Around

Binance as you know has taken over Bittrex in terms of volume and has been performing quite well with coin listings every week happening and interesting contests. However, due to the huge number of registrations on their platform, they have temporally closed registrations. But there is still a work-around to register an account with Binance despite the registrations being closed.

Here's a way to easily register an account with Binance:

Just follow this link and register an account as you would normally and enjoy! Do share with others too :)

@irazasyed
irazasyed / Peggo.md
Created Nov 4, 2017
Peggo Bookmarklet
View Peggo.md

Peggo Bookmarklet

  • Create a new bookmark with the below code as URL.
  • Go to any YT video.
  • Click on the bookmarklet.
  • Enjoy!
javascript:(function(){window.open('http://peggo.co/dvr/?vidurl='+encodeURIComponent(window.location.href));})();
@irazasyed
irazasyed / tunnel-valet.sh
Created Jun 25, 2017
Laravel Valet Share with Sub-Domain Support
View tunnel-valet.sh
# Tunnels to valet project with custom domain name.
# Uses ngrok.com with my personal github account and auth token
function tunnel_valet() {
HOST="${PWD##*/}"
DOMAIN=$(valet domain)
SUBDOMAIN="$HOST"
[[ "$1" ]] && SUBDOMAIN=$1;
for linkname in ~/.valet/Sites/*; do
if [[ "$(readlink $linkname)" = "$PWD" ]]
View instagram-follow-script.js
/* source https://www.youtube.com/watch?v=UKi1NwqKCz8
_aj7mu _r4e4p _95tat _o0442
*/
var jq = document.createElement('script');
jq.src = "//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
jQuery.noConflict()
@irazasyed
irazasyed / slack.md
Last active Mar 22, 2016
Reasons Slack is Better Than Any Other Communication Tools
View slack.md

Why Slack is Better Than Skype or Any Other Communication Tools

Reasons Slack is Better Than Skype

Slack Communities

Marketing Slack Community

Slack Community for PHP Programmers

Here are the reasons! Check it out.

@irazasyed
irazasyed / weight-utility.php
Created Jan 8, 2016
PHP: Utility function for getting random values with weighting.
View weight-utility.php
<?php
/**
* getRandomWeightedElement()
* Utility function for getting random values with weighting.
* Pass in an associative array, such as array('A'=>5, 'B'=>45, 'C'=>50)
* An array like this means that "A" has a 5% chance of being selected, "B" 45%, and "C" 50%.
* The return value is the array key, A, B, or C in this case. Note that the values assigned
* do not have to be percentages. The values are simply relative to each other. If one value
* weight was 2, and the other weight of 1, the value with the weight of 2 has about a 66%
* chance of being selected. Also note that weights should be integers.
You can’t perform that action at this time.