Skip to content

Instantly share code, notes, and snippets.

View arduanov's full-sized avatar
🍄
work is fun

Marsel Arduanov arduanov

🍄
work is fun
  • Perm, Russia
View GitHub Profile
@arduanov
arduanov / JwtUsageExample.cpp
Last active May 9, 2020 16:14
UE4 JWT Parser usage
#include "Kismet/GameplayStatics.h"
// ...
// Obtain reference to UXsollaLoginSubsystem object. It is assumed that login subsystem has been already initialized.
UGameInstance* GameInstance = UGameplayStatics::GetGameInstance(this);
UXsollaLoginSubsystem* XsollaLoginSubsystem = GameInstance->GetSubsystem<UXsollaLoginSubsystem>();
// Get "email" value from token youi've received previously from launcher
@arduanov
arduanov / full.html
Last active October 7, 2019 09:24
germany age gating
<!DOCTYPE html>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
@arduanov
arduanov / tsung install
Last active February 20, 2020 23:13
ulimit
echo "fs.file-max=1048576" >> /etc/sysctl.conf
echo "net.core.rmem_max = 16777216" >> /etc/sysctl.conf
echo "net.core.wmem_max = 16777216" >> /etc/sysctl.conf
echo "net.ipv4.tcp_rmem = 4096 87380 16777216" >> /etc/sysctl.conf
echo "net.ipv4.tcp_wmem = 4096 65536 16777216" >> /etc/sysctl.conf
sysctl -p
echo "* soft nofile 1048576" >> /etc/security/limits.conf
echo "* hard nofile 1048576" >> /etc/security/limits.conf
@arduanov
arduanov / gist:ae2f9b30b35a79f0a22b5011563bb8aa
Created December 31, 2018 18:15 — forked from luckydev/gist:b2a6ebe793aeacf50ff15331fb3b519d
Increate max no of open files limit in Ubuntu 16.04/18.04 for Nginx
# maximum capability of system
user@ubuntu:~$ cat /proc/sys/fs/file-max
708444
# available limit
user@ubuntu:~$ ulimit -n
1024
# To increase the available limit to say 200000
user@ubuntu:~$ sudo vim /etc/sysctl.conf
@arduanov
arduanov / README.md
Last active June 9, 2018 18:29 — forked from agnoster/README.md
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

bash-3.2$ go test -bench=. -benchmem
goos: darwin
goarch: amd64
pkg: go.uber.org/zap/benchmarks
BenchmarkDisabledWithoutFields/Zap-8 200000000 6.81 ns/op 0 B/op 0 allocs/op
BenchmarkDisabledWithoutFields/Zap.Check-8 200000000 7.09 ns/op 0 B/op 0 allocs/op
BenchmarkDisabledWithoutFields/Zap.Sugar-8 100000000 13.8 ns/op 16 B/op 1 allocs/op
BenchmarkDisabledWithoutFields/Zap.SugarFormatting-8 20000000 93.1 ns/op 184 B/op 7 allocs/op
BenchmarkDisabledWithoutFields/sirupsen/logrus-8 100000000 10.8 ns/op 16 B/op 1 allocs/op
BenchmarkDisabledWithoutFields/rs/zerolog-8 1000000000 2.38 ns/op 0 B/op 0 allocs/op
%pyspark
import matplotlib.pyplot as plt; plt.rcdefaults()
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
import StringIO
import pandas as pd
import os
@arduanov
arduanov / hadoop_spark_osx
Created April 20, 2017 15:53 — forked from cjzamora/hadoop_spark_osx
Hadoop + Spark installation (OSX)
Source: http://datahugger.org/datascience/setting-up-hadoop-v2-with-spark-v1-on-osx-using-homebrew/
This post builds on the previous setup Hadoop (v1) guide, to explain how to setup a single node Hadoop (v2) cluster with Spark (v1) on OSX (10.9.5).
Apache Hadoop is a framework that allows for the distributed processing of large data sets across clusters of computers using simple programming models. It is designed to scale up from single servers to thousands of machines, each offering local computation and storage. Rather than rely on hardware to deliver high-availability, the library itself is designed to detect and handle failures at the application layer, so delivering a highly-available service on top of a cluster of computers, each of which may be prone to failures. The Apache Hadoop framework is composed of the following core modules:
HDFS (Distributed File System): a distributed file-system that stores data on commodity machines, providing very high aggregate bandwidth across the cluster.
YARN (Yet A
@arduanov
arduanov / install.sh
Last active March 24, 2017 04:16
macOS
#xcode
xcode-select --install
sudo xcodebuild -license
#homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
#utils
brew install mc wget peco
<?php
if (ini_get('short_open_tag') == 0)
die('Error: short_open_tag parameter must be turned on in php.ini');
?><?
error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT);
if (getenv('BITRIX_VA_VER'))
define('VMBITRIX', 'defined');
if (version_compare(phpversion(),'5.3.0','<'))