Skip to content

Instantly share code, notes, and snippets.

View suricactus's full-sized avatar
🌍

Ivan Ivanov suricactus

🌍
View GitHub Profile
@moyix
moyix / killbutmakeitlooklikeanaccident.sh
Created February 5, 2022 22:51
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
@niksumeiko
niksumeiko / disable-html-form-input-autocomplete-autofill.md
Last active April 22, 2024 17:49
Disable HTML form input autocomplete and autofill

Disable HTML Form Input Autocomplete and Autofill

  1. Add autocomplete="off" onto <form> element;
  2. Add hidden <input> with autocomplete="false" as a first children element of the form.
<form autocomplete="off" method="post" action="">
    <input autocomplete="false" name="hidden" type="text" style="display:none;">
    ...
@DenisCarriere
DenisCarriere / bad_shapefile.md
Last active March 20, 2017 21:12
Bad things with Shapefiles

Bad Shapefiles

Here's a list of bad things that are related to shapefiles

  • There is a 2 GB size limit for any shapefile component file, which translates to a maximum of roughly 70 million point features.
  • Shapefiles do not contain an XY tolerance.
  • A shapefile may take up three to five times as much space as a file geodatabase or SDE because of shape compression methods.
  • Field names cannot be longer than 10 characters.
  • The maximum number of fields is 255
@Glamdring
Glamdring / location.js
Created April 23, 2015 13:30
Коментари в кода на postbank.bg :)
/**************************************************************************************/
/**************************************************************************************/
/**************************************************************************************/
var cnst_city_selected_zoom_level = 17;
function Cacher(url, icon) {
var cnst_dictionary = {
dict_cmd_choose_city:{bg:"Моля изберете град", en:"Please choose city"},
};
var self = this;
@LarryUllman
LarryUllman / gist:fbe8db2f1ecc6c92e74a
Created July 23, 2014 14:49
Stripe - Calculate Subscription Proration
proration cost = (period end - API request time) / (period end - period start) * quantity * plan price
@Nagyman
Nagyman / workflows-in-django.md
Last active January 27, 2024 08:29
Workflows in Django

Workflows (States) in Django

I'm going to cover a simple, but effective, utility for managing state and transitions (aka workflow). We often need to store the state (status) of a model and it should only be in one state at a time.

Common Software Uses

  • Publishing (Draft->Approved->Published->Expired->Deleted)