Skip to content

Instantly share code, notes, and snippets.

View alkorsan's full-sized avatar

Alkor San alkorsan

  • Morocco
View GitHub Profile
@alkorsan
alkorsan / mount_qcow2.md
Created July 19, 2019 03:32 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@alkorsan
alkorsan / keyservers.md
Created July 13, 2019 21:47 — forked from rjhansen/keyservers.md
SKS Keyserver Network Under Attack

SKS Keyserver Network Under Attack

This work is released under a Creative Commons Attribution-NoDerivatives 4.0 International License.

Terminological Note

"OpenPGP" refers to the OpenPGP protocol, in much the same way that HTML refers to the protocol that specifies how to write a web page. "GnuPG", "SequoiaPGP", "OpenPGP.js", and others are implementations of the OpenPGP protocol in the same way that Mozilla Firefox, Google Chromium, and Microsoft Edge refer to software packages that process HTML data.

Who am I?

@alkorsan
alkorsan / scanScope.txt
Created June 15, 2018 00:57 — forked from DorkForce/scanScope.txt
Console script - Search breakpoint model for value. SYNTAX: scanScope($scope.model, 'Fred');
console.log("Usage Syntax: scanScope(objectToScan, 'scanFor', ['whatToIgnore']); %c(whatToIgnore is optional and can be a string, or an array of strings) (scanScope can be shortened to ss)", 'color: red');
var abortAtLevel = 20,
callStack = 0,
errArray = [],
funArray = [],
scanLoop = function (whatToScan, scanValue, whatToIgnore, parentTree) {
scanValue = scanValue.toLowerCase();
if (Array.isArray(whatToIgnore)) {
whatToIgnore.forEach(function (ignoreVal) {
ignoreVal = lowerCase(ignoreVal);

Packages, variables, and functions. Learn the basic components of any Go program.

The Go Authors https://golang.org

  • Packages

Every Go program is made up of packages.

@alkorsan
alkorsan / get-old-chromium-binary.md
Created December 19, 2017 05:07 — forked from cletusw/get-old-chromium-binary.md
Download an old Chromium binary

(source)

Taking [denilson-sá's answer][2] further...

You need revision numbers to grab downloads. So first lookup the full version string from the following URL, adjusting parameters as needed:

https://omahaproxy.appspot.com/history.json?channel=stable&os=mac

For Chrome version 28 the full version string is 28.0.1500.71. Now go to https://omahaproxy.appspot.com and enter the full version string ("28.0.1500.71") into the Position Lookup box. Copy the Base Position number ("209842" in this case).

@alkorsan
alkorsan / gist:84e352dafaecbd1a321688649e7500c3
Created December 17, 2017 01:11 — forked from jlittlejohn/gist:4986708
HTACCESS: 5G Blacklist 2013
# 5G BLACKLIST/FIREWALL (2013)
# @ http://perishablepress.com/5g-blacklist-2013/
# 5G:[QUERY STRINGS]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} (\"|%22).*(<|>|%3) [NC,OR]
RewriteCond %{QUERY_STRING} (javascript:).*(\;) [NC,OR]
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3) [NC,OR]
@alkorsan
alkorsan / detect_gpu.js
Created December 8, 2017 20:53 — forked from demonixis/detect_gpu.js
Gets the user's GPU name using the `WEBGL_debug_renderer_info` WebGL extension. It returns a `string` with the graphics card name or `unknow` if the extension is not supported.
function getGraphicsCardName() {
var canvas = document.createElement("canvas");
var gl = canvas.getContext("experimental-webgl") || canvas.getContext("webgl");
if (!gl) {
return "Unknow";
}
var ext = gl.getExtension("WEBGL_debug_renderer_info");
if (!ext) {