Skip to content

Instantly share code, notes, and snippets.

Avatar

Sergey Aleynikov dur-randir

View GitHub Profile
View mi_debloat.sh
adb shell rm -rf /system/app/AnalyticsCore/
adb shell rm -rf /system/app/Duo/
adb shell rm -rf /system/app/facebook-appmanager/
adb shell rm -rf /system/app/IdMipay/
adb shell rm -rf /system/app/InMipay/
adb shell rm -rf /system/app/MiCloudSync/
adb shell rm -rf /system/app/MiPicks/
adb shell rm -rf /system/app/MiPlayClient
adb shell rm -rf /system/app/MiuiVideoPlayer
adb shell rm -rf /system/app/PaymentService/
View ol.pl
package Foo;
use overload '&{}' => sub { \&call_cplusplus };
sub call_cplusplus { warn 42 }
sub new {return bless sub {}, shift}
package main;
my $obj = Foo->new;
use Scalar::Util qw/reftype/;
warn reftype $obj;
$obj->();
View seabios.bad.log
SeaBIOS (version rel-1.8.0-48-g1d9e87b-dirty-20180223_211656-fangorn)
No Xen hypervisor found.
enabling shadow ram
Running on QEMU (q35)
Running on KVM
Add to e820 map: 00000000 20000000 1
Add to e820 map: fffc0000 00040000 2
RamSize: 0x20000000 [cmos]
malloc preinit
Add to e820 map: 000a0000 00050000 -1
View seabios.good.log
SeaBIOS (version rel-1.8.0-48-g1d9e87b-dirty-20180223_211656-fangorn)
No Xen hypervisor found.
enabling shadow ram
Running on QEMU (q35)
Running on KVM
Add to e820 map: 00000000 20000000 1
Add to e820 map: fffc0000 00040000 2
RamSize: 0x20000000 [cmos]
malloc preinit
Add to e820 map: 000a0000 00050000 -1
View uv.t
use Test::More;
use UV ();
{
my $loop = UV::default_loop();
}
{
my $handle = UV::check();
View xs.diff
- if ((opts & (IsReadonly | IsWeak)) == (IsReadonly | IsWeak)) {
- cv = CAIXS_install_cv<type, (AccessorOpts)(IsReadonly | IsWeak)>(aTHX_ full_name);
-
- } else if (opts & IsReadonly) {
- cv = CAIXS_install_cv<type, IsReadonly>(aTHX_ full_name);
-
- } else if (opts & IsWeak) {
- cv = CAIXS_install_cv<type, IsWeak>(aTHX_ full_name);
-
- } else {
View Makefile.PL
use ExtUtils::MakeMaker;
use ExtUtils::Depends;
my $package = ExtUtils::Depends->new('Foo', 'XS::Object::Magic');
WriteMakefile(
NAME => 'Foo',
$package->get_makefile_vars(),
);
View gist:bfa17fc674b4c0f6508ccb8b9a9423fc
perl -e 'sub foo {warn 42} $glob = $main::{foo}; $glob->(); *$glob{CODE}->()'
perl -e 'our $foo; sub foo {warn 42} $glob = $main::{foo}; $glob->(); *$glob{CODE}->()'
View mg_overload_table.pl
package Z;
use Devel::Peek ();
use overload "+"=>sub {42};
die "fail" unless 42 == bless({}) + 1;
Devel::Peek::Dump \%Z::;
use Inline C => <<END;
void foo(SV* targ) {
if (!SvOK(targ)) return;
if (SvROK(targ)) targ = SvRV(targ);
View gist:6a99b726515653576c7b5615791b5251
TEST_JOBS 16 32 72
blead 2:34 2:44 2:55
khw-harness 2:48 2:31 3:09