Skip to content

Instantly share code, notes, and snippets.

View martin12333's full-sized avatar

Martin Milan martin12333

View GitHub Profile
@martin12333
martin12333 / compile-lynx-wasm.sh
Created January 19, 2023 09:35 — forked from Potherca/compile-lynx-wasm.sh
Steps to compile the Lynx web browser to Web Assembly
# Sources used in figuring this out:
#
# - https://developer.mozilla.org/en-US/docs/WebAssembly/C_to_wasm
# - https://emscripten.org/docs/compiling/Building-Projects.html#building-projects
# Set up Emscripten SDK
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk/
./emsdk install latest
./emsdk activate latest
@martin12333
martin12333 / pycurses.py
Created January 16, 2023 10:12 — forked from claymcleod/pycurses.py
Python curses example
import sys,os
import curses
def draw_menu(stdscr):
k = 0
cursor_x = 0
cursor_y = 0
# Clear and refresh the screen for a blank canvas
stdscr.clear()
@martin12333
martin12333 / ubuntu-setup.sh
Created November 10, 2022 17:03 — forked from wildlyinaccurate/ubuntu-setup.sh
Setting up a new Ubuntu machine
#!/usr/bin/env bash
# Generate an ED25519 key and display the public key
ssh-keygen -o -a 100 -t ed25519
cat ~/.ssh/id_ed25519.pub
read -p 'You should add your public key to GitHub now. Press any key to continue...'
read -p 'Now you will generate a GPG key. Please use RSA/RSA with a keysize of 4096 bits. Press any key to continue...'
gpg --default-new-key-algo rsa4096 --gen-key
@martin12333
martin12333 / Dockerfile
Created November 10, 2022 15:52 — forked from psychemedia/Dockerfile
First sketch of a contentmine dockerfile
FROM node:4.3.2
##Based on
MAINTAINER Tony Hirst
RUN apt-get clean -y && apt-get -y update && apt-get -y upgrade && \
apt-get -y update && apt-get install -y wget ant unzip openjdk-7-jdk && \
apt-get clean -y
@martin12333
martin12333 / nested-code-blocks.md
Created October 6, 2022 17:03 — forked from mbigras/nested-code-blocks.md
Nested code blocks in technical documentation

Nested code blocks

Nested code blocks clarify technical documentation but rendering them with markdown is tricky.

Overview

Google Cloud Platform (GCP) technical documentation is formatted well enough; however, emulating that format with markdown is tricky.

The following are the main features about GCP documentation that I like:

Datasette tutorial written by GPT3

Prompt: a step by step tutorial for getting started with Datasette

This is a guide for getting started with Datasette. Datasette is a tool for creating and publishing data-driven websites. It is designed to make it easy to publish structured data, such as the results of a database query, in a way that is highly visible and interactive.

Datasette can be used to create websites that allow users to explore and visualize data, or to build applications that expose data via APIs. It can also be used as a static site generator, creating a completely static HTML website that can be deployed anywhere.

This guide will cover the basics of how to install and use Datasette. It will also show you how to create a simple data-driven website using Datasette.

@martin12333
martin12333 / hyperpolyglot-elixir
Created May 17, 2022 14:58 — forked from skovsgaard/hyperpolyglot-elixir
The content for the Hyperpolyglot entry on Elixir
elixir
======
version used
------------
1.2
show version
------------
$ elixir -v
@martin12333
martin12333 / windows_hardening.cmd
Created March 28, 2022 20:08 — forked from mackwage/windows_hardening.cmd
Script to perform some hardening of Windows OS
:: Windows 10 Hardening Script
:: This is based mostly on my own personal research and testing. My objective is to secure/harden Windows 10 as much as possible while not impacting usability at all. (Think being able to run on this computer's of family members so secure them but not increase the chances of them having to call you to troubleshoot something related to it later on). References for virtually all settings can be found at the bottom. Just before the references section, you will always find several security settings commented out as they could lead to compatibility issues in common consumer setups but they're worth considering.
:: Obligatory 'views are my own'. :)
:: Thank you @jaredhaight for the Win Firewall config recommendations!
:: Thank you @ricardojba for the DLL Safe Order Search reg key!
:: Thank you @jessicaknotts for the help on testing Exploit Guard configs and checking privacy settings!
:: Best script I've found for Debloating Windows 10: https://github.com/Sycnex/Windows10Debloater
:
commit 3f5e3bdbb45bc2cd9ae95972420eb11b0340f120
Author: Matthew Garrett <[email protected]>
Date: Mon Feb 1 13:31:00 2016 +1100
Block most UEFI variable deletions
Some systems appear to become upset if certain UEFI non-volatile variables
are delted, to the point of no longer POSTing successfully. For a short-term
fix, let's just block deletion of most variables while we figure out a
better approach.
@martin12333
martin12333 / helmhurts.py
Created January 30, 2022 14:32 — forked from astrojuanlu/helmhurts.py
Solving the Helmholtz equation in Python using FEniCS http://fenicsproject.org/
# coding: utf-8
#
# Solving Helmhotz equation with FEniCS
# Author: Juan Luis Cano Rodríguez <[email protected]>
# Inspired by: http://jasmcole.com/2014/08/25/helmhurts/
#
import sys
from dolfin import *
try: