Skip to content

Instantly share code, notes, and snippets.

View akaramires's full-sized avatar

Elmar Abdurayimov akaramires

View GitHub Profile
@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.
@nrollr
nrollr / MongoDB_macOS_Sierra.md
Last active April 1, 2024 16:23
Install MongoDB on Sierra using Homebrew

Install MongoDB on macOS Sierra

This procedure explains how to install MongoDB using Homebrew on macOS Sierra 10.12.
Official MongoDB install documentation: here

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@nrollr
nrollr / MySQL_macOS_Sierra.md
Last active January 31, 2024 14:45
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@skypce
skypce / gist:355e56d0774160bb5619
Created March 14, 2016 16:27
Upwork Client fix for Ubuntu 14.04 ( Unknown SSL error -12218 mapped to net::ERR_SSL_PROTOCOL_ERROR)
If you have this error: Unknown SSL error -12218 mapped to net::ERR_SSL_PROTOCOL_ERROR
and your upwork client does not run you need:
sudo apt-get install libnss3=2:3.15.4-1ubuntu7 libnss3-nssdb=2:3.15.4-1ubuntu7
sudo apt-mark hold libnss3 libnss3-nssdb
Solution provided by Ilya E from upwork.
@imran0101
imran0101 / EndlessRecyclerOnScrollListener.java
Last active February 22, 2022 12:50
RecyclerView position helper to get first and last visible positions
/**
* Custom Scroll listener for RecyclerView.
* Based on implementation https://gist.github.com/ssinss/e06f12ef66c51252563e
*/
public abstract class EndlessRecyclerOnScrollListener extends RecyclerView.OnScrollListener {
public static String TAG = "EndlessScrollListener";
private int previousTotal = 0; // The total number of items in the dataset after the last load
private boolean loading = true; // True if we are still waiting for the last set of data to load.
private int visibleThreshold = 5; // The minimum amount of items to have below your current scroll position before loading more.
@subfuzion
subfuzion / mongo-autostart-osx.md
Last active March 2, 2022 00:57
mongo auto start on OS X

Install with Homebrew

brew install mongodb

Set up launchctl to auto start mongod

$ ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents

/usr/local/opt/mongodb/ is a symlink to /usr/local/Cellar/mongodb/x.y.z (e.g., 2.4.9)

@denys281
denys281 / nginx.conf
Created February 11, 2014 09:36
phpmyadmin nginx virtual host (php-fpm)
server {
# Listen on port 81
listen 81;
# Server name being used (exact name, wildcards or regular expression)
# server_name phpmyadmin.my;
root /usr/share/phpmyadmin;
@corsonx
corsonx / upload_via_iframe
Created January 10, 2014 14:48
Posting a form via AJAX through a hidden iFrame. This is necessary when uploading an image using ajax for IE < 10. It is also useful in other cases, where your post endpoint cannot easily digest JSON, for instance.
// This particular code works with html that looks like this:
<div class="upload_container" id="photo_number_1">
<div><input name="upload" class="photo_upload_field" type="file" /></div>
<div><input type="button" class="upload_photo_submit" value="Upload Photo"></div>
<p class="center loading hidden"><img src="/assets/loading.gif"></p>
<script>
// yes, I know, don't actually put this in a script tag here. It's for illustration purposes only
$('.upload_photo_submit')[0]).click(function(event){ajaxFileUpload(event);});
</script>
@julionc
julionc / 00.howto_install_phantomjs.md
Last active April 26, 2024 09:13
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
doctype 5
head
title
| MySite.com ::
block title
| Awesome Stuff For Awesome People
body