Skip to content

Instantly share code, notes, and snippets.

View ARMoir's full-sized avatar
:shipit:

Alex Moir ARMoir

:shipit:
View GitHub Profile
#!/bin/bash
iatest=$(expr index "$-" i)
#######################################################
# SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me
#######################################################
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
@Alex-Just
Alex-Just / strip_emoji.py
Last active May 27, 2024 16:44
Python regex to strip emoji from a string
import re
# http://stackoverflow.com/a/13752628/6762004
RE_EMOJI = re.compile('[\U00010000-\U0010ffff]', flags=re.UNICODE)
def strip_emoji(text):
return RE_EMOJI.sub(r'', text)
print(strip_emoji('🙄🤔'))
@oscarkraemer
oscarkraemer / gist:c8747fbc85e7f908dcc00b4357fb04b2
Created November 19, 2017 20:15
Linux UEFI boot on Lenovo m91p
# http://www.rodsbooks.com/linux-uefi/
# 1. Install Linux normally
# 2. Boot from Linux live usb drive
# 3. Most likely /dev/sda1 but it can be something else:
mount /dev/sda1 /mnt
mkdir -p /mnt/EFI/Microsoft/Boot
# 5. Depending on if it is ubuntu, centos or any other distro:
cp /mnt/EFI/centos/grubx64.efi /mnt/EFI/Microsoft/Boot/bootmgfw.efi
# I don't remember but I think it was like this.
7 efibootmgr --create --label "Windows Boot Manager" --loader "\EFI\Microsoft\Boot\bootmgfw.efi"
@wynand1004
wynand1004 / snake_game.py
Created September 2, 2018 08:56
A Simple Snake Game made in Python 3
# Simple Snake Game in Python 3 for Beginners
# By @TokyoEdTech
import turtle
import time
import random
delay = 0.1
# Score
@pgodwin
pgodwin / DecompressBlob.cs
Created August 12, 2019 07:23
Cerner LZW Decompression
using System.Text;
/* This code provided by Bruce Jackson (brucejackson.info) and is
* provided "AS IS" with no warranties, expressed or implied, as to
* its effectivness or use.
*
* User agrees to edit the code to meet their partiular use and
* understands that this code has not been fully
* tested in a production environment.
*