Skip to content

Instantly share code, notes, and snippets.

View alaingalvan's full-sized avatar
Resident Latte Graphics Engineer. 👍

Alain Galvan alaingalvan

Resident Latte Graphics Engineer. 👍
View GitHub Profile
@alaingalvan
alaingalvan / Programming-Resources.md
Last active March 19, 2016 19:27
Software Development for Web Apps/Games Resources

Software Development Resources

When you do something, you need to put every ounce of effort you have into it, and finish it in a way that will make the people around you and yourself proud. You need to Live in what you're doing, breathe it and dream it. PhDs talk about this all the time, but this philosophy of focusing on one topic applies to everything you do.

This list is mostly Web and C++ resources, and is oriented for software development in Apps and Games.

Videos

Have you ever been bored learning something? When I see a video like the ones from VSauce or Kurzgesagt – In a Nutshell I'm captivated. It's the job of a video maker to make it as easy as possible for you to learn something, to entertain you if possible.

@alaingalvan
alaingalvan / react-carousel.js
Created December 29, 2016 20:08
A TypedScript Carousel Component for React.

Keybase proof

I hereby claim:

  • I am alaingalvan on github.
  • I am alaingalvan (https://keybase.io/alaingalvan) on keybase.
  • I have a public key whose fingerprint is 9F1B 21A6 7465 C633 405A DCCA D6FA 92C2 72F6 C9A2

To claim this, I am signing this object:

@alaingalvan
alaingalvan / hyper-vscode.js
Created April 7, 2017 23:33
My Hyper terminal config
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Fira Code, Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: '#bc3fbc',
@alaingalvan
alaingalvan / pycounter.cpp
Created August 10, 2017 13:17
Python C++ bindings code sample from docs
/*
* Copyright (C) 1999 Michael P. Reilly, All rights reserved.
* Written by Michael P. Reilly.
*/
/* headers */
#include <Python.h>
/* Module globals */
static PyObject *counter_error = NULL;
import React from 'react';
import Anime from 'react-anime';
class PlaybackAnime extends React.Component {
constructor() {
this.state = { play: true };
this.anime = null;
}
toggleAnime = () => {
//-----------------------------------------------------------------------------
// Photoshop Trick
// Author: Kiran Sudhakara
//
// Produces an image that most image editors cannot downsize Inspired
// by http://www.4p8.com/eric.brasseur/gamma.html
//-----------------------------------------------------------------------------
#include "windows.h"
#include <stdio.h>
//-----------------------------------------------------------------------------
  1. Download Geth, Etherium's official CLI and CPU miner.

  2. Create an account:

geth account new
  1. Download Ethminer.
@alaingalvan
alaingalvan / RecordingVSCodeMiniMap.md
Created August 14, 2019 04:13
Recording VS Code for use in YouTube Videos, etc.

So I wanted to make an animation of code being written in the minimap, so I set up VS Code so that it would write the minimap canvas to a PNG file every time there's a backspace (play that in reverse and you have typing out a file).

var fs = require('fs')
var curFrame = 0;
function saveCallback() {
    // Get the DataUrl from the Canvas
    const url = document.querySelectorAll('canvas')[1].toDataURL();

 // remove Base64 stuff from the Image
@alaingalvan
alaingalvan / sobol.cpp
Last active June 4, 2020 06:14
Sobol Quasi-Random Sequence Generation by Dr. John Burkardt. Forked to not use cout errors, use less dimensions (saving code size)
/**
* Sobol Noise Generation
* GNU LGPL license
* By Dr. John Burkardt (Virginia Tech)
* https://gist.github.com/alaingalvan/af92ddbaf3bb01f5ef29bc431bd37891
*/
//returns the position of the high 1 bit base 2 in an integer n
int getHighBit1(int n)
{