Skip to content

Instantly share code, notes, and snippets.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 28, 2024 15:13
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@singledigit
singledigit / cognito.yaml
Last active April 28, 2024 15:12
Create a Cognito Authentication Backend via CloudFormation
AWSTemplateFormatVersion: '2010-09-09'
Description: Cognito Stack
Parameters:
AuthName:
Type: String
Description: Unique Auth Name for Cognito Resources
Resources:
# Creates a role that allows Cognito to send SNS messages
SNSRole:
@DartPower
DartPower / ms-office-dl-links
Last active April 28, 2024 15:11
MS Office Download Links
@InNoHurryToCode
InNoHurryToCode / ClangOnWindows.md
Last active April 28, 2024 15:10
How to install clang on windows using the visual studio build tools

Clang on Windows (VS 2017 build tools)

There are plenty of tutorials online on how to install clang on windows with visual studioIDE and MinGW. However, there are none on clang with visual studio build tools.

Requirements:

  • 64-bit Windows 7 SP1 or newer with the latest updates installed
  • 6 GB of free space on the partition where Windows is installed
  • internet connection (for installation only)

1. Install VS 2017 build tools

%VS2017BuildToolsDir% = installation directory of VS 2017 build tools

@sebjai
sebjai / Execution_Limit_MarketOrder.ipynb
Last active April 28, 2024 15:10
Implementation of optimal execution using limit and market orders from Chap 8.5 of Algorithmic and High-Frequency Trading by Cartea, Jaimungal, & Penalva (2015) Cambridge University Press
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bUxEE
bUxEE / wp-recursive-menu.php
Last active April 28, 2024 15:07
Recursive menu/submenu list from wp_get_nav_menu_items. Change menu name and style to your needs. Supports unlimited number of submenus.
<?php
$menu_name = 'menu-name';
$locations = get_nav_menu_locations();
$menu = wp_get_nav_menu_object( $locations[ $menu_name ] );
$menuitems = wp_get_nav_menu_items( $menu->term_id, array( 'order' => 'DESC' ) );
//echo '<pre>'.print_r($menuitems).'</pre>';
function buildTree( array &$elements, $parentId = 0 )
{
@hlippek
hlippek / basic_scheduler.c
Created July 27, 2012 11:58
Implementation of a basic task scheduler
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define MAX_PROCESSES 32 /* the maximal number of processes in the system */
#define MAX_NAME_LEN 32
/* Process control block -
* holding all process relevant informations
*/
@0xjac
0xjac / private_fork.md
Last active April 28, 2024 15:01
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@WarningImHack3r
WarningImHack3r / ScreenSize.svelte
Created April 11, 2024 18:48
ScreenSize Tailwind component for Svelte
<script>
// Made by https://github.com/WarningImHack3r
// Inspired by https://gist.github.com/Sh4yy/0300299ae60af4910bcb341703946330
let width = 0;
let height = 0;
</script>
<svelte:window bind:innerWidth={width} bind:innerHeight={height} />
<div
@aras-p
aras-p / preprocessor_fun.h
Last active April 28, 2024 14:58
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,