Skip to content

Instantly share code, notes, and snippets.

View MakStashkevich's full-sized avatar
🍀
believe on the best

Maksim Stashkevich MakStashkevich

🍀
believe on the best
View GitHub Profile
@jocopa3
jocopa3 / MCPE_1.1.0.1_Ids.txt
Last active December 20, 2023 07:15
List of all Blocks/Items/Entity Id's in MCPE/Win10 1.1.0.1 and EDU Edition
For advanced users, a syntax highlighter for sublime text and
textmate which makes reading the list easier can be found here:
https://gist.github.com/jocopa3/e4a35921e4f978572e7f45360d231f37
============ Blocks ============
All blocks as found in the 1.1.0.0 Block::initBlocks function.
Block names are the same names used in the /give command.
Name Id Data
@xgqfrms-GitHub
xgqfrms-GitHub / express-static-server.md
Last active October 5, 2023 15:40
express static server (Node.js HTTP Server)

Node.js HTTP Server

/**
* express static server for react build/dist test!
*/ 

// simple express server for HTML pages!
// ES6 style
@jocopa3
jocopa3 / Burning Block Values.txt
Created December 7, 2016 18:34
All fire encouragement and flammability values found in the FireBlock constructor in MCPE 1.0.0
Block Name Encouragement Flammability
WoodPlanks 5 20
DoubleWoodenSlab 5 20
WoodenSlab 5 20
Fence 5 20
FenceGateOak 5 20
SpuceFenceGate 5 20
BirchFenceGate 5 20
JungleFenceGate 5 20
@dktapps
dktapps / MCPE-1.0-NETWORK-CHUNK-SPEC.md
Last active September 29, 2019 11:52
Network chunk specification as of MCPE 1.0

MCPE 1.0 Network Chunk specification

Note: the accuracy of this specification may be flawed. This specification is believed to be correct as of beta 1.0.0.7, but its accuracy is by no means guaranteed.

Basic changes

Biome colour removal

The ability to set biome colours disappeared this update, which is a shame. The old method using biome IDs is back; colours and gradients are now handled automatically client side. While this is a bonus for PocketMine in the way that biome colours in Anvil worlds will now work correctly again, it's a shame to see that capability disappear.

@Alex-Just
Alex-Just / strip_emoji.py
Last active April 9, 2025 08:48
Python regex to strip emoji from a string
import re
# http://stackoverflow.com/a/13752628/6762004
RE_EMOJI = re.compile('[\U00010000-\U0010ffff]', flags=re.UNICODE)
def strip_emoji(text):
return RE_EMOJI.sub(r'', text)
print(strip_emoji('🙄🤔'))
@mattia-beta
mattia-beta / ddos.conf
Last active April 24, 2025 06:22
IPtables DDoS Protection for VPS
### 1: Drop invalid packets ###
/sbin/iptables -t mangle -A PREROUTING -m conntrack --ctstate INVALID -j DROP
### 2: Drop TCP packets that are new and are not SYN ###
/sbin/iptables -t mangle -A PREROUTING -p tcp ! --syn -m conntrack --ctstate NEW -j DROP
### 3: Drop SYN packets with suspicious MSS value ###
/sbin/iptables -t mangle -A PREROUTING -p tcp -m conntrack --ctstate NEW -m tcpmss ! --mss 536:65535 -j DROP
### 4: Block packets with bogus TCP flags ###
@mihow
mihow / load_dotenv.sh
Last active April 25, 2025 17:10
Load environment variables from dotenv / .env file in Bash
# The initial version
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
# My favorite from the comments. Thanks @richarddewit & others!
set -a && source .env && set +a
@nicekiwi
nicekiwi / gulpfile.babel.js
Created March 7, 2017 13:45
New ES6 project with Babel, Browserify & Gulp + Bundling/Watching Multiple Files
import gulp from 'gulp';
import sourcemaps from 'gulp-sourcemaps';
import buffer from 'gulp-buffer';
import uglify from 'gulp-uglify';
import tap from 'gulp-tap';
import browserify from 'browserify';
import babel from 'babelify';
gulp.task('build', () => {
@zmts
zmts / tokens.md
Last active April 27, 2025 21:01
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@Kamori
Kamori / pony_orm_test.py
Created August 19, 2017 02:45
A ponyorm recursive to_dict example
{1: {'answers': [{'answer': 'here is the answer',
'bestof_question': [],
'created': datetime.datetime(2017, 8, 19, 2, 41, 58),
'id': 1,
'updated': datetime.datetime(2017, 8, 19, 2, 41, 58)}],
'bestanswer': None,
'created': datetime.datetime(2017, 8, 19, 2, 41, 58),
'id': 1,
'statusid': {'Name': 'Example', 'id': 1},
'tags': [],