Skip to content

Instantly share code, notes, and snippets.

@Anime4000
Anime4000 / terminal.md
Last active Jun 27, 2022
Mikrotik LTE Change IMEI
View terminal.md

Change Mikrotik LTE IMEI

Query which mode

/interface lte at-chat lte1 input="AT*PROD\?"

Enter Non-production mode

/interface lte at-chat lte1 input="AT*PROD=1"

Delete old IMEI

/interface lte at-chat lte1 input="AT*MRD_IMEI=D"

View find-replace-text-pdf-page.cs
// Open document
Document pdfDocument = new Document("Document.pdf");
// Create TextAbsorber object to find all instances of the input search phrase
TextFragmentAbsorber textFragmentAbsorber = new TextFragmentAbsorber("text");
// Accept the absorber for desired
pdfDocument.Pages[1].Accept(textFragmentAbsorber);
// Get the extracted text fragments
@ProdigySim
ProdigySim / 1.l4d2-2200-gamedata-fixes.md
Last active Jan 18, 2022
L4D2 2.2.0.0 gamedata fixes
View 1.l4d2-2200-gamedata-fixes.md

Introduction

SirPlease and ProdigySim were allowed early access to the Last Stand beta to check mod compatibility. We have been working on testing some sourcemod extensions and plugins, as well as reverse engineering some of the server code to discover necessary GameData changes.

These are the high level results of our investigations. Be aware that the server binaries could change up to the release day an these may no be perfectly accurate. I hope these will be a helpful starting point and/or reference for other plugin makers who are validating their gamedata and patches.

Breaking Changes

CBaseEntity Vtable

CBaseEntity vtable has a new member:

  • Linux: 14 CBaseEntity::ScriptGetModelName(void)const
@Ciantic
Ciantic / cloudflare-dyndns-a-aaaa-record-update.sh
Last active Feb 7, 2022
cloudflare dyndns script / update a A and AAAA record using bash script
View cloudflare-dyndns-a-aaaa-record-update.sh
#!/bin/bash
# Author: Jari Pennanen
# Url: https://gist.github.com/Ciantic/4e543f2d878a87a38c25032d5c727bf2
AUTH_EMAIL="john.doe@example.com" # Your Cloudflare email
AUTH_KEY="" # Get this from My profile -> API Keys -> View
DOMAIN="example.com" # main domain
SUBDOMAIN="home.example.com" # set A and AAAA-record of this subdomain
@henriksb
henriksb / Powershell download and execute one-liner
Created Oct 26, 2018
Quick one-liner to download and execute any file
View Powershell download and execute one-liner
powershell -c "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri 'ENTER URL' -OutFile '%appdata%\a.exe'; %appdata%\a.exe"
@TomCan
TomCan / gist:9644966
Last active Jun 23, 2022
Inject drivers in Windows installation after motherboard change
View gist:9644966
Today, after working with Windows for over 15 years now, I finally came across the solution to the
dreadfull BSOD STOP 0x0000007B after replacing the motherboard of a computer, or after moving the
harddrive to another computer, or after doing a P2V, or after ... you get the point.
Requirements:
- Windows install / boot CD
- Chipset / Mobo / Storage drivers of the new motherboard or storage controller
Steps:
- extract all the drivers to a USB thumb drive
@strangerstudios
strangerstudios / my_pmpro_getfile.php
Last active Sep 13, 2018
How to protect non-WordPress files in a subdirectory of your site using Paid Memberships Pro.
View my_pmpro_getfile.php
<?php
/*
This code handles loading a file from the /protected-directory/ directory.
(!) Be sure to change line 44 below to point to your protected directory if something other than /protected/
(!) Be sure to change line 64 below to check the levels you need.
(!) Add this code to your active theme's functions.php or a custom plugin.
(!) You should have a corresponding bit of code in your Apache .htaccess file to redirect files to this script. e.g.
###
@dck-jp
dck-jp / reboot.cs
Created Oct 6, 2012
Reboot/ Shutdown / Suspend on Windows8 By using C#
View reboot.cs
using System.Diagnostics;
namespace Reboot
{
class Program
{
static void Main(string[] args)
{
ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = "shutdown.exe";
@shilrobot
shilrobot / package.sh
Created Jun 27, 2012
Making mkbundle work on Windows
View package.sh
#!/bin/bash
# If this doesn't work, ensure you have UNIX line endings in this file
# (\n, not \r\n.) You can use Notepad++ to switch them.
# Cygwin package requirements: gcc-mingw, pkg-config
# If you want to pass -z to mkbundle: mingw-zlib1, mingw-zlib-devel
# crash immediately if anything bad happens
set -o errexit
set -o nounset
@dave1010
dave1010 / htaccess
Created Dec 14, 2011
HTTP Status Cats Apache (htaccess) config
View htaccess
# HTTP Status Cats
# Apache (htaccess) config created by @dave1010
# Licensed CC BY 2.0
# Images CC BY 2.0, from GirlieMac's photostream:
# http://www.flickr.com/photos/girliemac/sets/72157628409467125/with/6508023065/
# Usage: copy save this file as .htaccess or add it to your httpd.conf
ErrorDocument 404 '<a href="http://www.flickr.com/photos/girliemac/6508022985/" title="404 - Not Found by GirlieMac, on Flickr"><img src="http://farm8.staticflickr.com/7172/6508022985_b22200ced0.jpg" width="500" height="400" alt="404 - Not Found"></a>'