Skip to content

Instantly share code, notes, and snippets.

Avatar
😉

Biswapriyo Nath Biswa96

😉
View GitHub Profile
@WanderingGlitch
WanderingGlitch / ida2to3.py
Created Nov 12, 2019
IDA 2to3 fixers to help move from the newer APIs
View ida2to3.py
#!/usr/bin/env python
'''
This has some pretty gross hacks in it
But gives a general idea what it is like to write a 2to3 fixer
Basically run like this:
ida2to3.py /path/to/your/script /path/to/idc_bc695.py
Give it a once over to make sure it didn't break too much, then:
View wsl.kernel.patch
diff -N -r -u linux-4.19.72/arch/arm64/hyperv/hv_hvc.S WSL2-Linux-Kernel-4.19.72-microsoft-standard/arch/arm64/hyperv/hv_hvc.S
--- linux-4.19.72/arch/arm64/hyperv/hv_hvc.S 1969-12-31 16:00:00.000000000 -0800
+++ WSL2-Linux-Kernel-4.19.72-microsoft-standard/arch/arm64/hyperv/hv_hvc.S 2019-09-15 02:24:17.000000000 -0700
@@ -0,0 +1,54 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+/*
+ * Microsoft Hyper-V hypervisor invocation routines
+ *
+ * Copyright (C) 2018, Microsoft, Inc.
@luk6xff
luk6xff / ARMonQEMUforDebianUbuntu.md
Last active Aug 8, 2020 — forked from bruce30262/ARMDebianUbuntu.md
Emulating ARM with QEMU on Debian/Ubuntu
View ARMonQEMUforDebianUbuntu.md

You might want to read this to get an introduction to armel vs armhf.

If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.

Running ARM programs under linux (without starting QEMU VM!)

First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux

If there's no qemu-arm-static in the package list, install qemu-user-static instead

@fedme
fedme / Run Visual Studio Code for Linux from WSL.md
Last active Jun 29, 2020
Run Visual Studio Code for Linux from WSL on Windows 10
View Run Visual Studio Code for Linux from WSL.md

Run Visual Studio Code for Linux from WSL

Thanks a lot to mredbishop and others for their insturctions posted here. This is just a recap of what they figured out.

This process was tested on WSL Ubuntu 18.04.

Install VcXsrv on Windows

  1. Dowload the VcXsrv installer from https://sourceforge.net/projects/vcxsrv/
  2. Install the software on Windows

Add VS Code repositories

View wsl-build-static-bsdtar
# build static bsdtar linked against musl in Ubuntu 16.04 on WSL
mkdir bsdtarbuild && cd bsdtarbuild
sudo su
ALPINE_MIRROR=http://dl-cdn.alpinelinux.org/alpine
mkdir alpine-root
ALPINE_ROOT=$PWD/alpine-root
ALPINE_APKTOOLS=apk-tools-static-2.9.1-r0.apk # note this is a moving target
wget -q $ALPINE_MIRROR/latest-stable/main/x86_64/$ALPINE_APKTOOLS
tar xf $ALPINE_APKTOOLS
View share-artifacts-between-jobs.yml
# Job 'Environment: test=1' uploads artifact. Others wait while it finishes and download it.
clone_script:
- cmd: echo skip clone
environment:
ApiKey:
secure: SlDEDtAKuvsy+VErEuc/4DxdhPeKu2WRqvYzEh/fiH4=
TimeOutMins: 2
jobToWait: 'Environment: test=1'
matrix:
- test: 1
@Yasushi
Yasushi / bootlocal.sh
Last active Mar 28, 2019
boot2docker static ip
View bootlocal.sh
#!/bin/sh
kill `cat /var/run/udhcpc.eth0.pid`
ifconfig eth0 192.168.0.100 netmask 255.255.255.0 up
ip route add default via 172.168.0.1 dev eth0
echo nameserver 8.8.8.8 >> /etc/resolv.conf
#/mnt/sda1/var/lib/boot2docker/bootlocal.sh
@windyinsc
windyinsc / vlc_ts_error_fix.md
Created Mar 19, 2017
Fix for VLC: ts error: libdvbpsi error (PSI decoder): TS duplicate
View vlc_ts_error_fix.md

FIX FOR VLC ERROR BELOW

The following changes to VLC were successful in fixing all playback issues.

  • VLC Version 2.2.4 Weatherwax (Intel 64bit) on OS X 10.9

ISSUE:

ts error: libdvbpsi error (PSI decoder): TS duplicate (received 0, expected 1) for PID 0 ts error: libdvbpsi error (PSI decoder): TS duplicate (received 0, expected 1) for PID 4095

@Mostafa-Hamdy-Elgiar
Mostafa-Hamdy-Elgiar / Filetimes.py
Created Feb 25, 2017
Python Script to convert Microsoft widows file time to python date and also date to windows file time
View Filetimes.py
#!/usr/bin/env python
# Copyright (c) 2009, David Buxton <david@gasmark6.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
@danburzo
danburzo / README.md
Last active Apr 24, 2020
Scrape your Facebook saved links
View README.md

Facebook does not provide an easy way to get your saved links out of its system. Here's a quick script that does that for you.

Instructions

Go to your Saved links page and make sure you scroll way down to the bottom so that all your saved items are loaded. This script will generate a simple HTML page with your links, along with an Add to Pinboard action.

Bookmarklet

Drag this to your bookmarks toolbar: <a href='javascript:eval(unescape("//%20selector%20for%20accessing%20the%20links%0A//%20%28this%20might%20be%20subject%20to%20change%29%0Avar%20ITEM_SELECTOR%20%3D%20%22._4bl9%20%3E%20a%3Afirst-child%22%3B%0A%0Avar%20elements%20%3D%20%5B%5D.slice.call%28document.querySelectorAll%28ITEM_SELECTOR%29%29%3B%0A%0Avar%20items%20%3D%20elements.map%28function%28element%29%20%7B%20%0A%09%0A%09var%20title%20%3D%20element.textContent.trim%28%29%3B%0A%09var%20href%20%3D%20element.getAttribute%28%27href%27%29%3B%20%0A%0A%09//%20clean%20up%20weird%20links%0A%09if%20%28href.indexOf%28

You can’t perform that action at this time.