Skip to content

Instantly share code, notes, and snippets.

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

MocoNinja

🤷‍♀️
опа опа
View GitHub Profile
@sucremad
sucremad / callcon.md
Last active November 19, 2021 12:28
Function Call Conventions

Most Common Calling Conventions

Most commons are cdecl, stdcall, fastcall

In function calls, parameters are pushed onto the stack from right to left.

Example Function Pseudo Code

int func(int x, int y, int z, int m, int k);
 
int a, b, c, d, e, ret;
#/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')
@RobThree
RobThree / gameconsole.cs
Created October 17, 2017 08:42
OneLoneCoder GameConsole inspired C# version; work in progress and not a 1:1 conversion. API differs, tried to stay more close to dotnet best practices.
using Microsoft.Win32.SafeHandles;
using System;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading;
namespace ConsoleEngine
{
@RobThree
RobThree / bitmap2ascii.cs
Created September 18, 2017 11:25
A simple bitmap-to-ascii-art converter featuring configurable fonts, configurable chars, configurable dimension (width) etc.
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Linq;
using System.Text;
public class Bitmap2Ascii
{
@ellerbrock
ellerbrock / Free O'Reilly Books.md
Last active October 14, 2024 20:37 — forked from augbog/Free O'Reilly Books.md
Free O'Reilly Books

Free O'Reilly books and convenient script to just download them.

Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post

How to use:

  1. Take the download.sh file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)
  3. Run ./download.sh and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.
@jcarolinares
jcarolinares / useful_commands_to_use_in_shell.md
Last active February 3, 2023 02:23
This is a simple guide for non-pro bash users to do random but annoying tasks in just seconds

Useful commands to use in Shell or others:

This is a simple guide for non-pro bash users to do random but annoying tasks in just seconds

Your boss will be happy and you'll be less stressed ;)

Files

Search a file name using a string:

@jcavat
jcavat / Dockerfile
Last active November 14, 2024 21:19
docker-compose with php/mysql/phpmyadmin/apache
FROM php:7.1.2-apache
RUN docker-php-ext-install mysqli
@cryzed
cryzed / fix-infinality.md
Last active August 31, 2024 13:05
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@IgnoredAmbience
IgnoredAmbience / 99-noto-mono-color-emoji.conf
Last active October 25, 2024 06:01
Noto Emoji Color fontconfig for Konsole
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!--
Noto Mono + Color Emoji Font Configuration.
Currently the only Terminal Emulator I'm aware that supports colour fonts is Konsole.
Usage:
0. Ensure that the Noto fonts are installed on your machine.
1. Install this file to ~/.config/fontconfig/conf.d/99-noto-mono-color-emoji.conf
@hoserdude
hoserdude / doge.txt
Created June 15, 2015 15:15
Doge ASCII
▄ ▄
▌▒█ ▄▀▒▌
▌▒▒█ ▄▀▒▒▒▐
▐▄▀▒▒▀▀▀▀▄▄▄▀▒▒▒▒▒▐
▄▄▀▒░▒▒▒▒▒▒▒▒▒█▒▒▄█▒▐
▄▀▒▒▒░░░▒▒▒░░░▒▒▒▀██▀▒▌
▐▒▒▒▄▄▒▒▒▒░░░▒▒▒▒▒▒▒▀▄▒▒▌
▌░░▌█▀▒▒▒▒▒▄▀█▄▒▒▒▒▒▒▒█▒▐
▐░░░▒▒▒▒▒▒▒▒▌██▀▒▒░░░▒▒▒▀▄▌
▌░▒▄██▄▒▒▒▒▒▒▒▒▒░░░░░░▒▒▒▒▌