Skip to content

Instantly share code, notes, and snippets.

View ajpinedam's full-sized avatar

Andres Pineda ajpinedam

View GitHub Profile
@ajpinedam
ajpinedam / Calculator.cs
Created October 6, 2024 22:38 — forked from klmr/Calculator.cs
Workaround for missing numeric type constraints in C# — https://stackoverflow.com/q/32664/1968
using System;
using System.Collections.Generic;
namespace OperatorTest {
public interface ICalculator { }
public interface ICalculator<T> : ICalculator {
T Add(T a, T b);
T Divide(T a, T b);
T Multiply(T a, T b);
@ajpinedam
ajpinedam / HttpServer.cs
Created December 12, 2023 03:22 — forked from define-private-public/HttpServer.cs
A Simple HTTP server in C#
// Filename: HttpServer.cs
// Author: Benjamin N. Summerton <define-private-public>
// License: Unlicense (http://unlicense.org/)
using System;
using System.IO;
using System.Text;
using System.Net;
using System.Threading.Tasks;
@ajpinedam
ajpinedam / launch.json
Created January 19, 2023 04:32 — forked from cecilemuller/launch.json
Run ts-node in VSCode Debugger
{
"version": "0.2.0",
"configurations": [
{
"name": "Example",
"type": "node",
"request": "launch",
"runtimeExecutable": "node",
"runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"],
### Keybase proof
I hereby claim:
* I am ajpinedam on github.
* I am pinedax (https://keybase.io/pinedax) on keybase.
* I have a public key ASB0L3NixFlrBkhvvmH-mv9gpIugP4VUn7B7kuXRc52dXgo
To claim this, I am signing this object:
@ajpinedam
ajpinedam / HelloWorld.cs
Created October 16, 2021 20:31
Testing Twitter Preview
public class PowersOf2
{
static void Main()
{
// Display powers of 2 up to the exponent of 8:
foreach (int i in Power(2, 8))
{
Console.Write("{0} ", i);
}
}
@ajpinedam
ajpinedam / apk-change-version-number.md
Created August 8, 2019 16:50 — forked from benvium/apk-change-version-number.md
How to change the version number on an existing APK without re-building

This requires the latest version of apktool.

apktool d $APK_PATH -o $OUTPUT_FOLDER

# Open the apktool.yml text file
# Alter the versionCode and versionName entries

# now rebuild!
apktool build $OUTPUT_FOLDER 
git config --global alias.co checkout // move between branches or checkout a file
git config --global alias.st status // Status of the repository
git config --global alias.last 'log -1' // Last commit
git config --global alias.bn 'checkout -b' // Create branch and move to it
git config --global alias.cm 'commit -m' // Commit with Message
git config --global alias.ca 'clean -dfx' // Clean unwanted changes using .gitignore
git config --global alias.ul 'reset --soft HEAD~1' // Unload last commit
@ajpinedam
ajpinedam / xamarinandroidbindings.md
Created January 4, 2019 19:37 — forked from JonDouglas/xamarinandroidbindings.md
Xamarin Android Bindings Troubleshooting

Approaching a Xamarin.Android Bindings Case

1. Investigation

One of the best ways to investigate a problematic Xamarin.Android Binding is to first ensure you have the proper tooling available:

@ajpinedam
ajpinedam / iOS_device_types.txt
Created July 27, 2017 15:09 — forked from adamawolf/Apple_mobile_device_types.txt
List of iOS device codes types a.k.a. machine ids (e.g. iPhone1,1) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
iPhone5,1 : iPhone 5 (GSM)
@ajpinedam
ajpinedam / GIF-Screencast-OSX.md
Created June 21, 2017 16:30 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: