Skip to content

Instantly share code, notes, and snippets.

View skobkin's full-sized avatar
💭
Let's delete this code.

Alexey Skobkin skobkin

💭
Let's delete this code.
View GitHub Profile
@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active April 23, 2024 08:02
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@spaze
spaze / opera-vpn.md
Last active April 20, 2024 02:14
Opera VPN behind the curtains is just a proxy, here's how it works

2023 update

ℹ️ Please note this research is from 2016 when Opera has first added their browser "VPN", even before the "Chinese deal" was closed. They have since introduced some real VPN apps but this below is not about them.

🕵️ Some folks also like to use this article to show a proof that the Opera browser is a spyware or that Opera sells all your data to 3rd parties or something like that. This article here doesn't say anything like that.


When setting up (that's immediately when user enables it in settings) Opera VPN sends few API requests to https://api.surfeasy.com to obtain credentials and proxy IPs, see below, also see The Oprah Proxy.

The browser then talks to a proxy de0.opera-proxy.net (when VPN location is set to Germany), it's IP address can only be resolved from within Opera when VPN is on, it's 185.108.219.42 (or similar, see below). It's an HTTP/S proxy which requires auth.

@wandernauta
wandernauta / sp
Last active April 16, 2024 15:37
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/usr/bin/env bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#
@aras-p
aras-p / preprocessor_fun.h
Last active April 12, 2024 17:24
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@shmup
shmup / torrents.md
Last active April 11, 2024 10:03
transmission blocklist guide

Transmission Blocklist

The Transmission torrent client has an option to set a Blocklist, which helps protect you from getting caught and having the DMCA send a letter/email.

It's as simple as downloading and installing the latest client:

@mort3za
mort3za / torrc
Last active March 14, 2024 14:44
Using tor with bridges, torrc example config (bit.ly/m3torrc)
# sudo apt-get install obfs4proxy obfsproxy tor
# sudo vi /etc/tor/torrc
UseBridges 1
ClientTransportPlugin obfs3 exec /usr/bin/obfsproxy managed
ClientTransportPlugin obfs4 exec /usr/bin/obfs4proxy managed
# send email to bridges@torproject.org with body `get transport obfs4` you can get new bridges.
bridge obfs4 195.154.49.15:44705 BACD07DACE996093DC7635F33A98C49... cert=xc/wtKNWADfJQf232xSXT0WpzsaINw6fgPvZBy5Rkw4.../ypaZPDug9L... iat-mode=0
@guseppiguliano
guseppiguliano / huawei_e8372_config.md
Last active February 13, 2024 11:55
Huawei E8372 Linux Configuration and Setup

Dependencies

  1. usb_modeswitch, usb_modeswitch-data
  2. libusb1
  3. libusb-devel(Fedora), libusb-dev(Debian based)

Configuration

By default, your linux box would register your Huawei E8372 as a Mass Storage device and not (somehow) as a modem. First, make sure you have the exace same device we're talking about. This can be confirmed by looking at two values using the following command (while the dongle is plugged in): As an elevated user:

    # lsusb | grep Huawei
@alexandresalome
alexandresalome / normalizer.php
Created October 4, 2012 22:10
Normalizer for Doctrine entities
<?php
namespace Gitonomy\Bundle\CoreBundle\Serializer\Normalizer;
use Symfony\Bridge\Doctrine\RegistryInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
class EntitiesNormalizer implements NormalizerInterface, DenormalizerInterface
{
@skobkin
skobkin / 00-focusrite-scarlett-18i20gen3-remap.pa
Last active June 21, 2023 15:35
PipeWire and PulseAudio channel remapping for Focusrite 18i20 gen3
# <other parts of the configuration removed>
# Remapping Focusrite IO for separate use
# Inputs
# https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#module-remap-source
load-module module-remap-source source_name=18i20-in-1 source_properties="device.description='18i20 Input 1'" master=alsa_input.usb-Focusrite_Scarlett_18i20_USB_P92XEEZ9A04D41-00.multichannel-input remix=no channels=1 master_channel_map=front-left channel_map=mono
load-module module-remap-source source_name=18i20-in-2 source_properties="device.description='18i20 Input 2'" master=alsa_input.usb-Focusrite_Scarlett_18i20_USB_P92XEEZ9A04D41-00.multichannel-input remix=no channels=1 master_channel_map=front-right channel_map=mono
load-module module-remap-source source_name=18i20-in-3 source_properties="device.description='18i20 Input 3'" master=alsa_input.usb-Focusrite_Scarlett_18i20_USB_P92XEEZ9A04D41-00.multichannel-input remix=no channels=1 master_channel_map=rear-left channel_map=mono
load-module module-remap-sourc