Skip to content

Instantly share code, notes, and snippets.

View rez1dent3's full-sized avatar

Maxim Babichev rez1dent3

View GitHub Profile
@rez1dent3
rez1dent3 / client.go
Created March 27, 2021 07:21
p2p-server
package main
import (
"bufio"
"fmt"
"net"
"os"
"strings"
)
@rez1dent3
rez1dent3 / IpUtil.php
Created September 12, 2018 14:10
check ip range
<?php
namespace App\Utils;
class IpUtil
{
/**
* @var array
*/
@rez1dent3
rez1dent3 / ejs-loader.js
Last active December 20, 2017 06:44
ejsLoader
;(function (w) {
/**
* @type {Number}
*/
const version = .1;
/**
* @type {String}
*/
<?php
namespace App\Admin\Extensions;
use Symfony\Component\HttpFoundation\File\UploadedFile;
class MultipleFile extends \Encore\Admin\Form\Field\MultipleFile
{
/**
#!/bin/bash
cd php-src
BRANCH='PHP-7.2'
if [ "$1" != '' ]
then
BRANCH="$1"
fi
@rez1dent3
rez1dent3 / get-social-shares
Created April 19, 2017 12:35 — forked from ihorvorotnov/get-social-shares
Get number of shares from social platforms
Facebook*:
https://api.facebook.com/method/links.getStats?urls=%%URL%%&format=json
+ works, returns shares, likes, comments and total
Twitter:
http://urls.api.twitter.com/1/urls/count.json?url=%%URL%%&callback=twttr.receiveCount
+ v1 API but still works
Reddit:
http://buttons.reddit.com/button_info.json?url=%%URL%%
<?php
namespace Deimos\Router;
/**
* @param $variableName
*
* @return mixed
*/
function server($variableName, $default = null)
<?php
$length = 6;
$storage = [];
function toBase($num, $b = 62)
{
static $base = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$q = $num;
#!/usr/bin/expect
spawn mount.davfs https://webdav.yandex.ru /mnt/disk/
expect "Username:"
send "LOGIN\r"
expect "Password:"
send "PASSWORD\r"
expect eof
<?php
interface Adapter
{
/**
* @return array
*/
public function listColumns();