Skip to content

Instantly share code, notes, and snippets.

@ixahmedxi
ixahmedxi / init.vim
Created January 2, 2024 20:46
vscode neovim init.vim
" packadd quickscope
" execute 'luafile ' . stdpath('config') . '/lua/settings.lua'
function! s:manageEditorSize(...)
let count = a:1
let to = a:2
for i in range(1, count ? count : 1)
call VSCodeNotify(to == 'increase' ? 'workbench.action.increaseViewSize' : 'workbench.action.decreaseViewSize')
endfor
endfunction
sepal.length sepal.width petal.length petal.width variety
5.1 3.5 1.4 .2 Setosa
4.9 3 1.4 .2 Setosa
4.7 3.2 1.3 .2 Setosa
4.6 3.1 1.5 .2 Setosa
5 3.6 1.4 .2 Setosa
5.4 3.9 1.7 .4 Setosa
4.6 3.4 1.4 .3 Setosa
5 3.4 1.5 .2 Setosa
4.4 2.9 1.4 .2 Setosa
@rsms
rsms / macos-distribution.md
Last active May 14, 2024 17:48
macOS distribution — code signing, notarization, quarantine, distribution vehicles
@bdashrad
bdashrad / fizzbuzz.tf
Created May 14, 2024 15:18
a terrible idea
# fizzbuzz.tf
variable "start" {}
variable "end" {}
output "out_text" {
value = join(
"\n", [
for i in range(var.start, var.end):
i % 15 == 0 ? "FizzBuzz" :
@TuxSH
TuxSH / k11_latest_n3ds.cpp
Last active May 14, 2024 17:45
Complete 3DS kernel decompilation (11.14-latest N3DS Kernel11, with labels for all symbols, and comments)
This file has been truncated, but you can view the full file.
/* This file was generated by the Hex-Rays decompiler.
Copyright (c) 2007-2020 Hex-Rays <info@hex-rays.com>
Detected compiler: GNU C++
*/
#include <defs.h>
//-------------------------------------------------------------------------
@camtheman256
camtheman256 / export_when2meet.js
Created February 28, 2021 22:16
Export when2meet data from JS console
function exportData() {
const peopleMap = {};
for(let i = 0; i < PeopleIDs.length; i++) {
peopleMap[PeopleIDs[i]] = PeopleNames[i];
}
nameAtSlot = AvailableAtSlot.map(e => e.map(i => peopleMap[i]));
timedNames = TimeOfSlot.map((e, i) => [e, nameAtSlot[i]]);
return JSON.stringify(timedNames);
}
import random
from faker import Faker
from tabulate import tabulate
import sys
faker = Faker()
diccionario_arqueros = {}
class Competidor:
def __init__(self, nombre):
@Mikilo
Mikilo / ShowIfAttribute.cs
Last active May 14, 2024 17:36
Show/HideIf attributes for Unity.
using UnityEngine;
namespace NGTools
{
public enum MultiOp
{
None = -1,
/// <summary>Checks if the field's value equals one of the requirements.</summary>
Equals,
/// <summary>Checks if the field's value differs from all the requirements.</summary>
@ahmed-musallam
ahmed-musallam / compress_pdf.md
Last active May 14, 2024 17:32
How to compress PDF with ghostscript

How to compress PDF using ghostscript

As a developer, it bothers me when someone sends me a large pdf file compared to the number of pages. Recently, I recieved a 12MB scanned document for just one letter-sized page... so I got to googlin, like I usually do, and found ghostscript!

to learn more abot ghostscript (gs): https://www.ghostscript.com/

What we are interested in, is the gs command line tool, which provides many options for manipulating PDF, but we are interested in compressign those large PDF's into small yet legible documents.

credit goes to this answer on askubuntu forum: https://askubuntu.com/questions/3382/reduce-filesize-of-a-scanned-pdf/3387#3387?newreg=bceddef8bc334e5b88bbfd17a6e7c4f9

@ixahmedxi
ixahmedxi / keybindings.json
Created January 2, 2024 20:46
Vscode neovim keybindings.json
[
{
"command": "vscode-neovim.compositeEscape1",
"key": "j",
"when": "neovim.mode == insert && editorTextFocus",
"args": "j"
},
{
"command": "vscode-neovim.compositeEscape2",
"key": "k",