Skip to content

Instantly share code, notes, and snippets.

View fdrobidoux's full-sized avatar
📚
Working on a ReactJS certification!

Félix Dion-Robidoux fdrobidoux

📚
Working on a ReactJS certification!
View GitHub Profile
@WindAzure
WindAzure / install.qs
Created June 4, 2019 15:38
Silent Install script for Qt installer.
function Controller() {
gui.setSilent(true);
installer.autoRejectMessageBoxes();
installer.setMessageBoxAutomaticAnswer("OverwriteTargetDirectory", QMessageBox.Yes);
installer.setMessageBoxAutomaticAnswer("installationErrorWithRetry", QMessageBox.Ignore);
installer.installationFinished.connect(function() {
console.log("install finished");
gui.clickButton(buttons.NextButton);
})
@afmicc
afmicc / !README.md
Last active January 21, 2020 20:19
DataTable.net - Implementation of serverside processing in .net Core MVC with ef core dynamic query to paging, sorting and searching

DataTable.net - serverside processing

DataTable.net - Implementation of serverside processing in .net Core MVC with ef core dynamic query to paging, sorting and searching

@ThirdPartyNinjas
ThirdPartyNinjas / Coroutine.cs
Last active September 22, 2022 19:56
Simple Coroutines (for XNA/FNA/etc.)
using System.Collections;
using System.Collections.Generic;
namespace Memento
{
public class Coroutine
{
public bool Paused { get; set; }
internal void Reset(IEnumerator routine)
@dvddarias
dvddarias / SingletonScriptableObject.cs
Last active December 20, 2021 14:29
Better Unity Singleton Class
/************************************************************
* Better Singleton by David Darias
* Use as you like - credit where due would be appreciated :D
* Licence: WTFPL V2, Dec 2014
* Tested on Unity v5.6.0 (should work on earlier versions)
* 03/02/2017 - v1.1
* **********************************************************/
using System;
using UnityEngine;
@fgilio
fgilio / axios-catch-error.js
Last active April 11, 2024 19:02
Catch request errors with Axios
/*
* Handling Errors using async/await
* Has to be used inside an async function
*/
try {
const response = await axios.get('https://your.site/api/v1/bla/ble/bli');
// Success 🎉
console.log(response);
} catch (error) {
// Error 😨
@hediet
hediet / main.md
Last active March 11, 2024 15:05
Proof that TypeScript's Type System is Turing Complete
type StringBool = "true"|"false";


interface AnyNumber { prev?: any, isZero: StringBool };
interface PositiveNumber { prev: any, isZero: "false" };

type IsZero<TNumber extends AnyNumber> = TNumber["isZero"];
type Next<TNumber extends AnyNumber> = { prev: TNumber, isZero: "false" };
type Prev<TNumber extends PositiveNumber> = TNumber["prev"];
@davidfowl
davidfowl / Example1.cs
Last active March 28, 2024 20:36
How .NET Standard relates to .NET Platforms
namespace Analogy
{
/// <summary>
/// This example shows that a library that needs access to target .NET Standard 1.3
/// can only access APIs available in that .NET Standard. Even though similar the APIs exist on .NET
/// Framework 4.5, it implements a version of .NET Standard that isn't compatible with the library.
/// </summary>INetCoreApp10
class Example1
{
public void Net45Application(INetFramework45 platform)

How you can help reduce node_modules bloat

This recent reddit thread reveals discontent among the web development community about the sheer volume of stuff in a typical node_modules dir. 140MB in this case!

Is it a design flaw in npm?

Opinions in the thread varied from "I'm surprised npm even works" to "everything is fine". I'm not going to offer an opinion, just these two observations:

  1. node_modules dirs typically do contain lots of stuff that doesn't need to be there.
  2. The latest version mitigates overall size by flattening the dependency tree, but some of the bloat is beyond npm's control.
@ruario
ruario / README.md
Last active January 11, 2020 22:53
Using an Ubuntu 14.04 Docker image to build the Vivaldi Source code package

Install docker via your distro's package manager and configure it for your user.

Use the "vivaldibld.docker" docker template file as follows, to build an appropriate Docker image:

docker build -t vivaldibld - < vivaldibld.docker

After this completes successfully, you can run the docker image, like so:

@gokulkrishh
gokulkrishh / media-query.css
Last active April 18, 2024 18:20
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */