Skip to content

Instantly share code, notes, and snippets.

View thelebster's full-sized avatar
:octocat:
Do nothing, it is ok.

Anton Lebedev thelebster

:octocat:
Do nothing, it is ok.
View GitHub Profile
@olih
olih / jq-cheetsheet.md
Last active April 22, 2025 04:14
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

#5&0xff=TTL, здесь нужно указать правильный TTL до DPI
iptables -I INPUT -p tcp --sport 443 -m u32 --u32 "0=0x45000028&&4=0x00000000&&5&0xff=60&&0x20=0x50140000" -j DROP
iptables -I INPUT -p tcp --sport 80 -m u32 --u32 "04=0x00000000&&5&0xff=60&&0x60=0x39352e31&&0x64=0x36372e31" -j DROP
#Зигуй за РТ
@six519
six519 / decode.cc
Last active February 3, 2019 13:45
Node.js C++ Addon (libdecodeqr) - Decode QR Code Image
/**
* Complete code at https://github.com/six519/jsdecodeqr
* https://www.npmjs.com/package/jsdecodeqr
**/
#include <node.h>
#include <v8.h>
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <decodeqr.h>
@PurpleBooth
PurpleBooth / README-Template.md
Last active April 29, 2025 02:22
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@suderman
suderman / userscript.js
Last active April 20, 2022 04:41
Plex Fluid userscript
// Change these settings
var username = 'myname',
password = 'mypass',
pin = [0,0,0,0];
// Auto-login
var login = setInterval(function(){
if ($('form#user-account-form').length) {
clearInterval(login);
$('input#username').val(username);
@gmanau
gmanau / nginx-socketio-ssl-reverse-proxy.conf
Last active March 25, 2024 12:15
How to setup nginx as nodejs/socket.io reverse proxy over SSL
upstream upstream-apache2 {
server 127.0.0.1:8080;
}
upstream upstream-nodejs {
server 127.0.0.1:3000;
}
server {
listen 80;
server
{
listen 80;
server_name _;
location / {
resolver 8.8.8.8;
proxy_pass http://$http_host$request_uri;
}
}
@hofmannsven
hofmannsven / README.md
Last active September 17, 2023 20:18
PHP and Xdebug (Notes on OS X, VVV and MAMP)
@guyellis
guyellis / removeMongoField.js
Last active November 30, 2021 23:37
How to remove a field from a collection in MongoDB
// Params:
// 1. query (filter) if you only want to remove this field from some records. {} will select any.
// 2. $unset the field(s) that you want to remove. Here I've set them to null but the value doesn't matter as it's ignored.
// 3. multi must be set to true otherwise it will only operate on the first record that it finds.
//
// Run this command in the MongoDB shell
db.<collectionName>.update( {}, {$unset: {<fieldName1>: null, <fieldName2>: null}}, {multi: true});
@swarminglogic
swarminglogic / watchfile.sh
Last active January 1, 2025 19:07
watchfile - monitor file(s) and execute a command when files are changed
#!/bin/bash
version=1.0.1
versionDate="2014-02-14"
function showHelp() {
echo "watchfile - monitor file(s)/command and perform action when changed
Possible ways of usage
----------------------------------------