Skip to content

Instantly share code, notes, and snippets.

@Akellacom
Akellacom / live.js
Created August 20, 2014 19:12
Хак для возвращения функции live в jquery
jQuery.fn.live = function (types, data, fn) {
jQuery(this.context).on(types,this.selector,data,fn);
return this;
};
@import "_variables";
@import "_mixins";
@import "_fonts";
@import "_form";
html {
height: 100%;
margin: 0;
padding: 0;
}
#!/bin/bash
if [ -z $1 ]
then
echo "Usage: $0 path/2/proxy.list"
exit 1
fi
cat "$1" | while read line
do
host=`echo $line | sed 's/:[0-9]*.//'`
var timeout = 20;
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type= 'text/javascript';
script.src= 'https://code.jquery.com/jquery-2.1.0.min.js';
head.appendChild(script);
function checkJQLoaded(){return typeof $ != 'undefined' && $.fn != 'undefined';}
var loadJQ = setInterval(function () {
timeout--;
@Akellacom
Akellacom / install.sh
Created July 30, 2017 14:12 — forked from imposibrus/install.sh
Install MongoDB PHP driver on Ubuntu 14.04
sudo apt-get install -y php-pear php5-dev
sudo pecl install mongo
sudo sh -c "echo 'extension=mongo.so' > /etc/php5/mods-available/mongo.ini"
sudo ln -s /etc/php5/mods-available/mongo.ini /etc/php5/apache2/conf.d/mongo.ini
sudo service apache2 restart
class Icu4c < Formula
desc "C/C++ and Java libraries for Unicode and globalization"
homepage "http://site.icu-project.org/home"
url "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-src.tgz"
version "64_2"
sha256 "52a3f2209ab95559c1cf0a14f24338001f389615bf00e2585ef3dbc43ecf0a2e"
bottle do
cellar :any
sha256 "f01dbe4266d1180c1da01d973200ed897cfa8ec8bf505c0f57f7f693bc566062" => :catalina
@Akellacom
Akellacom / Authenticate.php
Created November 25, 2021 20:22 — forked from kresnasatya/Authenticate.php
Fixed problem Laravel Passport doesn't redirect back to authorization form after login
<?php
namespace App\Http\Middleware;
use Illuminate\Auth\Middleware\Authenticate as Middleware;
class Authenticate extends Middleware
{
/**
* Get the path the user should be redirected to when they are not authenticated.