Skip to content

Instantly share code, notes, and snippets.

View styx's full-sized avatar
🌴
¯\_(ツ)_/¯

Mikhail S. Pabalavets styx

🌴
¯\_(ツ)_/¯
View GitHub Profile
@styx
styx / kindle.sh
Created September 2, 2017 17:06 — forked from Madrigal/kindle.sh
Send files to your Amazon Kindle via the Command Line Interface.
# Command line utility to send attachments to your kindle
# It supports sending a PDF in both regular form and with the convert option
# and sending to the regular (@kindle.com) or free Kindle mail (@free.kindle.com)
# The only argument it has is the name of the file to send. It will detect if
# it is a pdf and treat it accordingly.
## Preferences
# If true, send one version with pdf as-is, another with 'convert' subject
# else, just send the pdf version
@guycalledseven
guycalledseven / manual-uninstall-paragon-ntfs.sh
Last active November 14, 2023 10:48
Manually remove Paragon NTFS v15 leftovers MacOS
# after appcleaner does his magic, do this
sudo rm -rf "/Library/Application Support/Paragon Software/"
sudo rm /Library/LaunchDaemons/com.paragon-software.installer.plist
sudo rm /Library/LaunchDaemons/com.paragon-software.ntfs.loader.plist
sudo rm /Library/LaunchDaemons/com.paragon-software.ntfsd.plist
sudo rm /Library/LaunchAgents/com.paragon-software.ntfs.notification-agent.plist
sudo rm -rf /Library/Filesystems/ufsd_NTFS.fs/
sudo rm -rf /Library/PrivilegedHelperTools/com.paragon-software.installer
sudo rm -rf /Library/Extensions/ufsd_NTFS.kext/
@helderco
helderco / db-open
Created October 6, 2015 14:51
Script to open a mysql database in Sequel Pro from a service in docker-compose.
#!/bin/bash
set -e
show_help() {
cat << EOF
Usage: ${0##*/} [-u USER] [-p PASS] [-P PORT] [-H HOST] [DATABASE]
${0##*/} -h
Open a standard connection in Sequel PRO.
@Rottweiler
Rottweiler / gist:44fe4461a4552acf303a
Last active January 18, 2023 10:49
Heavily obfuscated UnConfuserEx tool
UnConfuserEx https://mega.nz/#!U1hxwQKb!7WFBSjrZgg8ieFp15K0RJW8rWuyMHZTO9bpCekhBQfY
ConfuserExDupPopPatcher https://mega.nz/#!IkhHzZDS!vPYABdYJtuDIGJBHdKzwIqLajxugJaNlENWr5CWjNlo
ConfuserExStringDecryptor https://mega.nz/#!plhxRJyY!Vq9eRS-gixC__q75860gDD8Tcm_ncOfCCCP_HQKguUM
ConfuserExCallFixer https://mega.nz/#!0gZFlbwC!KFka_Kxe-GuU-d8COni91xmGPbiRnbX6lBLYAomn7No
I'm not responsible for what you do with these -- they may very well be backdoored
@Dr-Nikson
Dr-Nikson / README.md
Last active June 8, 2023 12:04
Auth example (react + redux + react-router)
@Dr-Nikson
Dr-Nikson / README.md
Last active January 14, 2019 06:35 — forked from vjpr/README.md

Reduce boilerplate in Redux

  • Create actions similar to Flummox.
  • Generate action ids.
  • Supports actions with decorators, promises, and therefore ES7 async.
@brianhempel
brianhempel / bench_rails_memory_usage.rb
Last active October 6, 2022 12:47
A script to test the memory usage of your Rails application over time. It will run 30 requests against the specified action and report the final RSS. Choose the URL to hit on line 45 and then run with `ruby bench_rails_memory_usage.rb`.
require "net/http"
def start_server
# Remove the X to enable the parameters for tuning.
# These are the default values as of Ruby 2.2.0.
@child = spawn(<<-EOC.split.join(" "))
XRUBY_GC_HEAP_FREE_SLOTS=4096
XRUBY_GC_HEAP_INIT_SLOTS=10000
XRUBY_GC_HEAP_GROWTH_FACTOR=1.8
XRUBY_GC_HEAP_GROWTH_MAX_SLOTS=0
@tonymtz
tonymtz / gist:714e73ccb79e21c4fc9c
Created November 15, 2014 00:02
Uninstall XQuartz.app from OSX Yosemite
launchctl unload /Library/LaunchAgents/org.macosforge.xquartz.startx.plist
sudo launchctl unload /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist
sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz
sudo pkgutil --forget org.macosforge.xquartz.pkg
# Log out and log in
defmodule Curried do
defmacro defc({name, _, args}, [do: body]) do
curried_args = Enum.map(Enum.with_index(args), fn({_, index}) ->
Enum.take(args, index + 1)
end)
for a <- curried_args do
if a == Enum.at(curried_args, Enum.count(curried_args) - 1) do
quote do
def unquote(name)(unquote_splicing(a)) do
unquote(body)
@davidalber
davidalber / python-cryptography-install.md
Created May 1, 2014 19:32
Steps to successfully install Python cryptography package on Mac OS X 10.8.5.

Prior to setting the PKG_CONFIG_PATH, as below, pip install cryptography failed with Symbol not found: _ffi_type_double on my machine running Mac OS X 10.8.5. I am not sure how commonly the error occurs for other users.

brew install libffi

# Note the version-specific path below.
PKG_CONFIG_PATH=/usr/local/Cellar/libffi/3.0.13/lib/pkgconfig/ pip install cryptography