Skip to content

Instantly share code, notes, and snippets.

View back2war's full-sized avatar

Yulian Tarantiuk back2war

  • Faria Systems Ltd.
  • Ukraine
View GitHub Profile
@approovm
approovm / 00-android-bypass-certificate-pinning-and-mitm-attack-setup.md
Last active May 14, 2024 18:38
Certificate Pinning Bypassing: Setup with Frida, mitmproxy and Android Emulator with a writable file system
@arthurnn
arthurnn / active_job_instrumentation.rb
Created February 12, 2019 12:54
Base instrumentation for ActiveJob + Sidekiq
def stats
# TODO
end
def dogtags
# TODO
end
ActiveSupport::Notifications.subscribe("enqueue.active_job") do |*args|
event = ActiveSupport::Notifications::Event.new(*args)
@timotgl
timotgl / uninstall-razer-synapse.sh
Last active April 24, 2024 15:20
How to fully uninstall Razer Synapse 2 on OS X (10.11-10.13) (El Capitan, Sierra, High Sierra) without using Razer's official uninstall tool
# How to uninstall Razer Synapse 2 ( https://www.razerzone.com/synapse-2 )
# on OS X (10.11-10.13) (El Capitan, Sierra, High Sierra)
# without using Razer's official uninstall tool.
# Tested on OS X 10.11.5 in July 2016.
# Edited with additional steps for later OS X versions,
# contributed by commenters on this gist.
# Step 1: In your terminal: stop and remove launch agents
launchctl remove com.razer.rzupdater
@javan
javan / google-drive-mime-types.md
Last active June 24, 2023 18:22
Google Drive's undocumented MIME types

The Google Drive API supports these MIME types, but if you try to filter using them, you may find you're not getting the document types back that you expect. Especially when using setMimeTypes() with Google's JavaScript Picker.

Here are the poorly documented or completely undocumented MIME types I discovered:

If you want application/vnd.google-apps.document, also use application/vnd.google-apps.kix. Source.

If you want application/vnd.google-apps.spreadsheet, also use application/vnd.google-apps.ritz. Via a private email from a Google employee.

If you want application/vnd.google-apps.presentation, also use application/vnd.google-apps.punch. Source.

@kurisuchan
kurisuchan / gist:1262135
Created October 4, 2011 16:43
Moving MySQL databases to ramdisk on Ubuntu
# Tweaked from http://tomislavsantek.iz.hr/2011/03/moving-mysql-databases-to-ramdisk-in-ubuntu-linux
# Log in as root
# Mount ramdisk folder in RAM
mkdir /tmp/ramdisk
mount -t tmpfs -o size=128M tmpfs /tmp/ramdisk/
# Move MySQL data
mv /var/lib/mysql /tmp/ramdisk/mysql
ln -s /tmp/ramdisk/mysql/ /var/lib/mysql
@ariera
ariera / README.markdown
Created August 7, 2011 16:23
Nestable, sortable and dragable categories

Nestable, sortable and dragable categories:

In the project I'm working on we wanted to have a Category model which we wanted to be nestable. But we also liked the user to have a draggable interface to manage and rearrange the order of his categories. So we chose awesome_nested_set for the model and jQuery.nestedSortable for the UI.

It took me some time to arrange things to work properly so I wanted to share my work in case it helps anybody.

Before beginning

you might want to take a look at a demo app

  1. go to: http://awesomenestedsortable.heroku.com/groups/
  2. click in show of any group
@sishen
sishen / gist:1019347
Created June 10, 2011 17:49
Nokogiri Template Builder. (Rails 3.0)
require 'action_view'
module ActionView
module Template::Handlers
class NokogiriBuilder
class_attribute :default_format
self.default_format = Mime::XML
def call(template)
require 'nokogiri'