Skip to content

Instantly share code, notes, and snippets.

View drawcode's full-sized avatar
😎
Shipping product

Ryan Christensen drawcode

😎
Shipping product
View GitHub Profile
@drawcode
drawcode / recover-deleted-branch.sh
Created October 11, 2022 02:32 — forked from umayr/recover-deleted-branch.sh
How to recover a deleted branch
## Pre-requisite: You have to know your last commit message from your deleted branch.
git reflog
# Search for message in the list
# a901eda HEAD@{18}: commit: <last commit message>
# Now you have two options, either checkout revision or HEAD
git checkout a901eda
# Or
git checkout HEAD@{18}
@drawcode
drawcode / git-tag-delete-local-and-remote.sh
Created September 14, 2022 01:07 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@drawcode
drawcode / how-software-companies-die.md
Last active January 4, 2022 23:44
How Software Companies Die

How Software Companies Die

Orson Scott Card

The environment that nurtures creative programmers kills management and marketing types - and vice versa.

Programming is the Great Game. It consumes you, body and soul. When you're caught up in it, nothing else matters. When you emerge into daylight, you might well discover that you're a hundred pounds

==========================
How Software Companies Die
==========================
- Orson Scott Card
The environment that nurtures creative programmers kills management and
marketing types - and vice versa.
Programming is the Great Game. It consumes you, body and soul. When
you're caught up in it, nothing else matters. When you emerge into
@drawcode
drawcode / custom_game_engines_small_study.md
Created April 24, 2020 19:20 — forked from raysan5/custom_game_engines_small_study.md
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) becaus

@drawcode
drawcode / MinimalAPIs.md
Created September 13, 2021 10:43 — forked from davidfowl/MinimalAPIs.md
Minimal APIs at a glance
@drawcode
drawcode / the-last-question-isaac-asimov.md
Created June 11, 2021 16:48
the-last-question-isaac-asimov.md

The Last Question by Isaac Asimov, LET THERE BE LIGHT!

Comic version

The Last Question by Isaac Asimov © 1956

The last question was asked for the first time, half in jest, on May 21, 2061, at a time when humanity first stepped into the light. The question came about as a result of a five dollar bet over highballs, and it happened this way:

Alexander Adell and Bertram Lupov were two of the faithful attendants of Multivac. As well as any human beings could, they knew what lay behind the cold, clicking, flashing face -- miles and miles of face -- of that giant computer. They had at least a vague notion of the general plan of relays and circuits that had long since grown past the point where any single human could possibly have a firm grasp of the whole.

@drawcode
drawcode / dotnet-csharp-github-list-get.cs
Created May 4, 2021 21:14
dotnet-csharp-github-list-get.cs - GitHub directory and file gets.
var httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.UserAgent.Add(
new ProductInfoHeaderValue("AppSpecificHeader", "1"));
var repo = "{org}/{repo}";
var contentsUrl = $"https://api.github.com/repos/{repo}/contents";
var contentsJson = await httpClient.GetStringAsync(contentsUrl);
var contents = (JArray)JsonConvert.DeserializeObject(contentsJson);
foreach(var file in contents)
{
var fileType = (string)file["type"];
@drawcode
drawcode / csharp.auth.jwt.cs
Created March 27, 2021 13:34
csharp.auth.jwt.cs
using System;
using System.IO;
using System.Security.Cryptography;
using System.IdentityModel.Tokens.Jwt;
using Microsoft.IdentityModel.Tokens;
using System.Security.Claims;
namespace Auth.Util {
class SignToken {
static void Main(string[] args) {
@drawcode
drawcode / test-loading-gradient-animated.css
Created March 8, 2021 00:46
test-loading-gradient-animated.css
.animated-text {
box-sizing: border-box;
margin: 8px;
width: 66.6667%;
background: linear-gradient(to right, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.1) 40%, rgba(0, 0, 0, 0) 100%) no-repeat rgba(0, 0, 0, 0.1);
position: relative;
min-height: 4px;
min-width: 100px;
animation-duration: 1.5s;
animation-fill-mode: forwards;