Skip to content

Instantly share code, notes, and snippets.

View OmeGak's full-sized avatar
🌀
Rewriting history

Alejandro Avilés OmeGak

🌀
Rewriting history
View GitHub Profile
@OmeGak
OmeGak / wire-chat-export.md
Created September 27, 2020 18:37
Wire chat export

Wire doesn't support exporting chat history (wireapp/wire#116). It is, however, possible to access the decrypted messages in the local storage of a browser. This guide will help you produce a text export once you are logged in https://app.wire.com. All from the browser console.

Open a connection to your browser local storage:

var db
var request = indexedDB.open("wire@production@4278eafb-b21c-4d7a-aad4-2be4fa3a9fa0@permanent")
request.onerror = function(event) {
  console.log("Why didn't you allow my web app to use IndexedDB?!")
}

Keybase proof

I hereby claim:

  • I am omegak on github.
  • I am omegak (https://keybase.io/omegak) on keybase.
  • I have a public key ASD7YGLDujyb3u2cu6xvmLd_D0bOpfVDmLcZ4oFpzzAjjwo

To claim this, I am signing this object:

@OmeGak
OmeGak / 502.html
Last active August 9, 2016 12:09
NGINX 502 autoreload
<head>
<title>502 Bad Gateway</title>
</head>
<body>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
<script>
function tryRefresh() {
var xhr = new XMLHttpRequest();
@OmeGak
OmeGak / 0_reuse_code.js
Last active August 29, 2015 14:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@OmeGak
OmeGak / indico.sublime-project
Created September 25, 2014 12:08
My sublime project settings for developing Indico
{
"folders":
[
{
"path": "indico/src",
"file_exclude_patterns": ["*.min.js",
"*.min.css",
"lib/*",
"src/ext_modules/*/*",
"src/indico/htdocs/js/ckeditor/lang/*",
@OmeGak
OmeGak / Blindstore CERN Webfest
Created August 2, 2014 15:24
Blindstore CERN Webfest
# Blindstore
> ![](http://i.imgur.com/Yj5qUjm.png)
>
> Blindstore is the first stone for a secure communication protocol.
## Motivation
Snowden's leaks last year disclosed the fragile condition of the privacy on the Internet, having been threatened not only by private companies but also by governments' intelligence agencies.
Since then, quite a few developments have been done in order to mitigate the eavesdropping of private communications. I'd like to talk breafly about two services: Lavabit and Protonmail.
@OmeGak
OmeGak / raetikon.cpp
Last active April 8, 2016 13:26
Decompiled code from Secrets of Raetikon Deserter achievement trigger
function GinkgoGames::SinglePlayerLevel::onQuit() {
// Achievement check begins
rbx = *(rdi + 0x70); // rbx = ID of current scenario
rax = GIN::Symbolize("sp_forst_destructor"); // rax = representation of scenario "sp_forst_destructor"
if (rbx == rax) { // check if we are in scenario "sp_forst_destructor"
rax = GIN::Node::getPropertyValue(
GIN::Node::find(GIN::Symbolize("destructionDirector")), // destructionDirector is the unavoidable mechanism
"Capacitor", // that starts once all 8 shards are plugged in
"killCounter",
"charge",
@OmeGak
OmeGak / indico-obj-filtering.md
Last active August 29, 2015 14:00
Object filtering strategy in Indico

This document discusses the common strategy of Indico for filtering objects from the DB. We can either go:

  • Implicit
  • Explicit

Implicit

Ferhat came up with a helper+decorator to standardize the way we filter objects:

@staticmethod
@utils.filtered
@OmeGak
OmeGak / cern_afs_kerberos.md
Last active July 7, 2024 11:08
Authentication at CERN made not-an-ordeal (kind of)

AFS Kerberos at CERN

"Kerberos is not the authentication system CERN deserves, but the one we need". - A wise man

This guide aims to ease the pain of setting up Kerberos authentication in your local (Ubuntu) machine and then completely forget about it.

Ready to fight?

First of all, install the following packages if you want to be successful on this journey:

#Indico client-side MVC It's time to go full MVC in Indico!

Why MVC?

We all want our architecture to be simple, yet beautiful.

When developing applications using just jQuery, the piece missing is a way to structure and organize your code. It’s very easy to create a JavaScript app that ends up a tangled mess of jQuery selectors and callbacks, all desperately trying to keep data in sync between the HTML for your UI, the logic in your JavaScript, and calls to your API for data.

A number of modern JavaScript frameworks provide developers an easy path to organizing their code using variations of a pattern known as MVC (Model-View-Controller). MVC separates the concerns in an application into three parts: