Skip to content

Instantly share code, notes, and snippets.

View MocoNinja's full-sized avatar
🤷‍♀️
опа опа

MocoNinja

🤷‍♀️
опа опа
View GitHub Profile
@MocoNinja
MocoNinja / 99-color.emoji.conf
Created July 21, 2022 06:49
Probado en Debian Testing con la fuente de repos; sacado de los comentarios de: https://gist.github.com/IgnoredAmbience/7c99b6cf9a8b73c9312a71d1209d9bbb; checkear cosas de fonttconfig que se mencionan ahi (todo que nunca hare jajaja)
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="pattern">
<test qual="any" name="family"><string>monospace</string></test>
<edit name="family" mode="append" binding="weak"><string>Noto Color Emoji</string></edit>
</match>
<match target="pattern">
<test qual="any" name="family"><string>serif</string></test>
@MocoNinja
MocoNinja / asyncawait.js
Created November 5, 2021 21:42
Cheatsheet: fireship's-code-this-💪-not-that-💩
const random = () => {
return Promise.resolve(Math.random());
}
console.log('Esto es 💩 🙅🙅🙅');
const rumRandomAsyncNums = () => {
let uno, dos, tres;
@MocoNinja
MocoNinja / main.py
Created September 22, 2021 07:33
Python Filter | Map | Reduce Quick Reminder
#!/usr/bin/python3
# -*- encoding: utf-8 -*-
import logging as log
from functools import reduce
log.basicConfig(level=log.INFO)
@MocoNinja
MocoNinja / Dockerfile
Created September 8, 2021 09:57
Pruebas python timezones / detectar puestas de sol
FROM python:alpine
ADD requirements.txt .
RUN pip install -r requirements.txt
ADD main.py .
ENV TZ Europe/Madrid
CMD ["python", "main.py"]
@MocoNinja
MocoNinja / borrar_torrents_viejos.sh
Created August 28, 2021 11:26
Borrar Torrents Viejos
#!/bin/bash
ROOT_FOLDER="/mnt/Cosicas/Descargas/_TORRENTS/_TORRENT_FILES"
CLEAN_FOLDER="$ROOT_FOLDER/finished"
LOG="$ROOT_FOLDER/log.log"
### https://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux
GREEN='\033[0;32m'
RED='\033[0;31m'
CYAN='\033[0;36m'
YELLOW='\033[0;33m'
@MocoNinja
MocoNinja / ComplementoDos.java
Created August 16, 2020 17:31
Representación interna de los enteros en Java: quick reminder
/**
*
* @author javier
* Esta clase rápirda me permite ver cómo almacena java los enteros como número de 32 bits
* y los negativos como el complemento de 2
*/
public class ComplementosDos {
private static final int numeroPorDefecto = 5;
public static void main(String[] args) {
boolean sacarInfoValoresLimite = false;
@MocoNinja
MocoNinja / hack_walled_garden.py
Created October 28, 2018 19:54
Builds.Hack.Me Scripts
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import requests as r
def get_remaining(current, max=1024):
return max - current
def get_request(captcha, name='a'):
url = "http://ctf.slothparadise.com/walled_garden.php?name={}&captcha={}".format(name, captcha)
@MocoNinja
MocoNinja / bitshift_example.cc
Last active July 10, 2018 19:06
pr0b1tscpp
#include <iostream>
#include <iomanip> // Manipulate IO
using namespace std;
void print_hex(unsigned int* number)
{
cout << "0x" << setfill('0') << setw(8) << hex << *number << endl;
}
@MocoNinja
MocoNinja / downloader.py
Created March 22, 2018 18:09 — forked from JuanjoSalvador/downloader.py
Extracts and decrypt a list of adf.ly links from a forum's post
# -*- coding: utf-8 -*-
import base64, requests, os, re, sys
from bs4 import BeautifulSoup
def _crack(code):
zeros = ''
ones = ''
for n,letter in enumerate(code):
#/bin/bash
# Installs libfreetype6 2.8.0 into affected electron app.
# For more details ee:
# https://github.com/atom/atom/issues/15737
# https://github.com/Microsoft/vscode/issues/35675
CRT=$(dpkg-query --showformat='${Version}' --show libfreetype6)
CRT=$(echo $CRT | sed -e 's/-.*$//g')