Skip to content

Instantly share code, notes, and snippets.

@HoShiMin
HoShiMin / SymParser.cpp
Created September 24, 2018 21:03
PDB symbols downloader and parser
#include <windows.h>
#include <vector>
#include <string>
#include "SymParser.h"
// Using Wide-versions of DbgHelp functions:
#define DBGHELP_TRANSLATE_TCHAR
// Expose additional declarations from DbgHelp.h:
#define _NO_CVCONST_H
@PROGrand
PROGrand / ExampleController.cs
Last active April 16, 2024 21:45
SwaggerResponse and ProducesResponseType attributes checking
[ApiController]
[Route("[controller]")]
public class ExampleController : ControllerBase
{
// SwaggerResponse supported, i prefer old one.
[HttpGet]
[SwaggerOperation("LoginUser")]
[SwaggerResponse(statusCode: StatusCodes.Status200OK, type: null, description: "signed user email account")]
[SwaggerResponse(statusCode: StatusCodes.Status400BadRequest, type: null, description: "wrong email or password")]
[Route("/users/login")]
@median-man
median-man / .gitmessage
Last active April 16, 2024 21:45 — forked from adeekshith/.git-commit-template.txt
This commit message template helps you write **useful** commit messages.
# <type>: <subject> (Max 50 char, Why is this change necessary?)
# |<---- Using a Maximum Of 50 Characters ---->|
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Explain how the commit addresses the issue
# IMPORTANT!! Describe any side effects of the change.
# Provide links or keys to any relevant tickets, articles or other resources
# Examples: "Jira issue [ABC-123]" or "Closes Github issue #123"
@raphlinus
raphlinus / subpixel_antialias.py
Created May 1, 2019 13:59
Research code to do RGB subpixel antialiasing using angle info in signed distance fields
import math
# http://vcl.itn.liu.se/publications/2011/GS11/edtaa_preprint.pdf
def tex(df, cos_th):
cos_th = abs(cos_th)
sin_th = math.sqrt(1 - cos_th ** 2)
if cos_th < sin_th:
cos_th, sin_th = sin_th, cos_th
a1 = 0.5 * sin_th / cos_th # note: paper is missing the 0.5!
@dixneuf19
dixneuf19 / zsh-virtualenv-setup.md
Last active April 16, 2024 21:41 — forked from hminnovation/zsh-virtualenv-setup.md
Setup python, pip, virtualenv and virtualwrapper, with zsh on a new machine
@MoonTahoe
MoonTahoe / upload.yaml
Last active April 16, 2024 21:40
Github Action to build iOS app with expo and upload to testflight
# Just place this file in your repo under the .github/workflows folder.
# You set all of the secrets in the setting of the repo
name: Deploy to Testflight
# When a pull request is closed...
# This is because this action commits back to the repository
# so setting this on a push would cause an infinite loop of commits
# unless you pragmatically check the contents of the repo or something
@sgillies
sgillies / advanced_rasterio_features.ipynb
Last active April 16, 2024 21:39
Advanced Rasterio features notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
%scala
import java.io
import org.apache.spark.sql.streaming._
import org.apache.spark.sql.streaming.StreamingQueryListener._
def writeToFile(file: File, str: String): Unit = {
val writer = new FileWriter(file)
try { writer.append(str).append("\n") }
finally { writer.close }
println("saving progress file successful")
@sts10
sts10 / rust-command-line-utilities.markdown
Last active April 16, 2024 21:33
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@Meshiest
Meshiest / godot multiplayer.md
Last active April 16, 2024 21:32
overview of how I understand godot multiplayer

Godot 4 Scene Multiplayer

I'm too lazy to write this as official documentation so I'm transcribing my experiences here for reference.

This is high level and does not cover how to setup your peer, only how to use the API itself.

This is not a tutorial.

If you are just getting started, this tutorial by DevLogLogan is worth watching.