Skip to content

Instantly share code, notes, and snippets.

@JulianGR
JulianGR / Markdown cheatsheet obsidian.md
Last active April 17, 2025 08:30
Custom Markdown cheatsheet for the note-taking app Obsidian

useful shortcuts

  • Ctrl + N: new note
  • Ctrl + E: toggle edit mode
  • Ctrl + enter: toggle checkbox
  • Ctrl + shift + F: search among all files
  • Ctrl + P: command pannel
  • Ctrl + [ or ] : change indentation of a list item
  • Alt + click to make multiple cursos

Internal linking

@pitermarx
pitermarx / DesignTimeFactory.cs
Created May 4, 2023 13:22
Script to generate EF migration scripts. One per migration
public class DesignTimeFactory : IDesignTimeDbContextFactory<MyDbContext>
{
public MarketDataServiceDbContext CreateDbContext(string[] args)
=> new MyDbContext(new DbContextOptionsBuilder<MyDbContext>().UseSqlServer(args[0]).Options);
}
curl "https://www.foxnews.com/api/article-search?searchBy=categories&values=fox-news%2Fpolitics&size=30&from=30"
@ixs
ixs / intel_x520_patcher.py
Last active April 17, 2025 08:28
Intel x520 EEPROM Patcher allows to unlock the x520 network card to work with non-intel branded SFP modules.
#!/usr/bin/env python3
#
# Simple Intel x520 EEPROM patcher
# Modifies the EEPROM to unlock the card for non-intel branded SFP modules.
#
# Copyright 2020,2021,2022 Andreas Thienemann <[email protected]>
#
# Licensed under the GPLv3
#
# Based on research described at https://forums.servethehome.com/index.php?threads/patching-intel-x520-eeprom-to-unlock-all-sfp-transceivers.24634/
@dvliman
dvliman / gist:11264471
Created April 24, 2014 18:24
4chan source code leak
<?
if(file_exists('/www/global/lockdown')) {
if($_COOKIE['4chan_auser'] && $_COOKIE['4chan_apass'] && ($_POST['mode']=='usrdel'||$_GET['mode']=='latest')) {
// ok
}
else {
die('Posting temporarily disabled. Come back later!<br/>&mdash;Team 4chan (uptime? what\'s that?)');
}
}
include_once "./yotsuba_config.php";
@markasoftware
markasoftware / enterprise_token.rb
Last active April 17, 2025 08:23
OpenProject Enterprise mode for free
############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################
############ also be sure to RESTART OpenProject after replacing the file. ################
############ it doesn't show that enterprise mode is enabled in the settings, but all ################
############ enterprise mode features, such as KanBan boards, are enabled. ################
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) 2012-2023 the OpenProject GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
@wmvanvliet
wmvanvliet / _interactive
Created May 21, 2024 08:08
Script to request a node through SLURM and create an interactive TMUX session on it
#!/bin/bash
# Start tmux
tmux new -d -s "slurm$SLURM_JOB_ID"
# Make job wait for user to connect
sleep 8h
@matiaslopezd
matiaslopezd / webhook.header.txt
Last active April 17, 2025 08:21
Woocommerce webhook payload and header example
expect 100-continue
content-length 1998
connection close
x-wc-webhook-delivery-id 36e520ebabc2fa725092ff4a47acedf2
x-wc-webhook-id 3
x-wc-webhook-signature 5poyFy4qB6fdvvT5pGbefZmfkpL48uD47F0WYwfmpo4=
x-wc-webhook-event created
x-wc-webhook-resource order
x-wc-webhook-topic order.created
x-wc-webhook-source https://www.website.com/
@toonvandenbos
toonvandenbos / infomaniak_cloud_server_installation_FR.md
Last active April 17, 2025 08:20
Installer un serveur Cloud Infomaniak
@x0nu11byt3
x0nu11byt3 / elf_format_cheatsheet.md
Created February 27, 2021 05:26
ELF Format Cheatsheet

ELF Format Cheatsheet

Introduction

Executable and Linkable Format (ELF), is the default binary format on Linux-based systems.

ELF

Compilation