Skip to content

Instantly share code, notes, and snippets.

View astiob's full-sized avatar

Oleg Oshmyan astiob

View GitHub Profile
@nhatminhle
nhatminhle / stdatomic.h
Last active August 11, 2024 21:57
A portable version of stdatomic.h extracted from the FreeBSD libc, for Clang 3.1+ and GCC 4.7+.
/*
* An implementation of C11 stdatomic.h directly borrowed from FreeBSD
* (original copyright follows), with minor modifications for
* portability to other systems. Works for recent Clang (that
* implement the feature c_atomic) and GCC 4.7+; includes
* compatibility for GCC below 4.7 but I wouldn't recommend it.
*
* Caveats and limitations:
* - Only the ``_Atomic parentheses'' notation is implemented, while
* the ``_Atomic space'' one is not.
@imneme
imneme / randutils.hpp
Last active September 25, 2024 13:41
Addresses common issues with C++11 random number generation; makes good seeding easier, and makes using RNGs easy while retaining all the power.
/*
* Random-Number Utilities (randutil)
* Addresses common issues with C++11 random number generation.
* Makes good seeding easier, and makes using RNGs easy while retaining
* all the power.
*
* The MIT License (MIT)
*
* Copyright (c) 2015-2022 Melissa E. O'Neill
*
@NathanSweet
NathanSweet / Reddit_Highlight_New_Comments.user.js
Created December 4, 2015 14:29
Highlight new Reddit comments with this GreaseMonkey user script.
// ==UserScript==
// @name Reddit: Highlight New Comments v3
// @description Highlights comments on Reddit that are new since your last visit.
// @author Chris H (Zren / Shade), Nathan Sweet
// @icon https://reddit.com/favicon.ico
// @namespace http://xshade.ca
// @version 1
// @include /https?:\/\/((www|pay|[a-z]{2})\.)?reddit\.com\/r\/[a-zA-Z0-9]+\/comments\/.*/
// @grant GM_addStyle
// ==/UserScript==
@kmaehashi
kmaehashi / README.md
Created February 19, 2017 08:43
アニメソングの歌詞ならここにおまかせ?データセット
@yancyn
yancyn / git-svn.md
Last active July 20, 2024 00:44
Migrate Archive Google Code SVN to Git

Migrate Archive Google Code SVN to Git

Requirements

  • git
  • git-svn

Setup¹

$ sudo apt-get install git
$ sudo add-apt-repository ppa:git-core/ppa
@schrodyn
schrodyn / decompiler
Created April 26, 2017 13:27 — forked from anonymous/decompiler
Androguard decompilation script for APKs
#!/usr/bin/python
"""
Androguard decompilation script.
Feed it an APK and an output directory and it will dump the source for you.
I used this script to learn some androguard skillz.
by k3170makan
"""
from sys import argv
from sys import exit
@imneonizer
imneonizer / how-to-download-from-pan-baidu.md
Created October 28, 2021 08:59
How to download from pan.baidu without account

How to download from pan.baidu.com

Disclaimer:

  • This methods uses a 3rd party website: https://baidu.kinh.cc/.
  • I don't know chinese and after one day of searching for a method I finally found this. I don't know how safe this website is but it does the job.
  • Do it on your own responsibility. I have no idea about possible copyright (if there is such a thing in China) and other stuff regarding to this.

Steps

1. Open the website mentioned above and fill out fields as following:

@alvinhochun
alvinhochun / cfguard-for-mingw-w64.md
Last active October 29, 2023 08:31
Control Flow Guard (CFG/CFGuard) for mingw-w64

Control Flow Guard (CFG/CFGuard) for mingw-w64

Control Flow Guard is a security mitigation that verifies the target address of indirect calls. It works by having the compiler insert a check at indirect call sites to verify the validity of the call target, and also the linker write the necessary data and flags into the PE/COFF image to enable the feature on Windows' end.