Skip to content

Instantly share code, notes, and snippets.

View Marqin's full-sized avatar
🏳️‍🌈

Marqin

🏳️‍🌈
  • London, UK
  • 09:47 (UTC +01:00)
View GitHub Profile
//https://isocpp.org/wiki/faq/dtors#memory-pools
#include <iostream>
#include <exception>
#include <map>
#include <stdlib.h>
// 1
class Pool {
@Marqin
Marqin / trivia.cpp
Created April 9, 2018 05:55
What this will print?
#include <iostream>
class A {
public:
void foo(float x) {
std::cout << x << " is a float." << std::endl;
}
};
class B : public A {
#include <functional>
#include <string>
int foo (int a)
{
return a;
}
void foo (std::string s) {}
@Marqin
Marqin / ExportChromePasswords.js
Last active February 26, 2018 17:52 — forked from beaverb1ll/ExportChromePasswords.js
ExportChromePasswords.js
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 += '"hostname","username","password","formSubmitURL","httpRealm","usernameField","passwordField"';
for(i=0; i<model.length; i++){
function(get-git-hash _git-hash)
if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
execute_process(
COMMAND git rev-parse HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
else()
set(GIT_HASH "NO_GIT_COMMIT_HASH_DEFINED")
DIR=$(mktemp -d)
python -m http.server --bind XXX.XXX.XXX.XXX 8080 &
PID=$!
certbot certonly --webroot $DIR [...]
kill $PID
sleep 0.5
kill -0 $PID && kill -9 $PID