Skip to content

Instantly share code, notes, and snippets.

@gldraphael
gldraphael / $PROFILE.ps1
Last active August 25, 2021 05:07
dotfiles
# Prompt stuff
# ###############################################
# Import posh-git
Import-Module posh-git
# Update powershell prompt path color
$GitPromptSettings.DefaultPromptPath.ForegroundColor = [System.ConsoleColor]::Blue
# Setup starship
@gldraphael
gldraphael / new.sh
Last active July 19, 2020 19:20
Setting up a quick dotnet console project for testing
# Create the solution directory
mkdir so-example
cd so-example
# Create a console project
dotnet new console --name ConsoleApp
# Create a solution file and add the web project to it
dotnet new sln
dotnet sln add ConsoleApp/ConsoleApp.csproj
@gldraphael
gldraphael / vs-for-mac-git-push-bug.md
Last active November 8, 2017 18:05
Reproducing the VS for Mac Push bug

Current behaviour

Pushing commits shows a file-picker when the local repository is not up-to-date with the remote.

Steps to reproduce

Please follow the steps exactly as given below. Time required: Approx. 7-10 minutes.

  1. Create a new project from VS for Mac with the Use git for version control option checked.
  2. Make a few commits (from within VS for Mac)
@gldraphael
gldraphael / webpack.config.js
Created February 3, 2017 18:23
Webpack Config for Vue with ts using av-ts
var path = require('path')
var webpack = require('webpack')
module.exports = {
entry: './src/app.ts',
output: {
path: path.resolve(__dirname, './dist'),
publicPath: '/dist/',
filename: 'app.js'
},
@gldraphael
gldraphael / keybase.md
Created September 20, 2016 06:01
keybase.md

Keybase proof

I hereby claim:

  • I am gldraphael on github.
  • I am gldraphael (https://keybase.io/gldraphael) on keybase.
  • I have a public key ASAcimhSAJKJzSJRRZQO3yWC6kkXJMIXLfM6sfs0nuzNOgo

To claim this, I am signing this object:

@gldraphael
gldraphael / AppCompatPreferenceActivity.java
Last active May 22, 2019 17:19
Abstract base class for the SettingsActivtiy which implements and proxies the necessary calls to be used with AppCompat, and the Settings Activity that inflates a toolbar at runtime.
package com.example.activities;
import android.content.res.Configuration;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatDelegate;
import android.support.v7.widget.Toolbar;
@gldraphael
gldraphael / main.cpp
Last active September 26, 2015 04:43
Simple Line Drawing Algorithm using SDL
#include <SDL.h>
#include <stdio.h>
#include <string>
//Screen dimension constants
const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;
//Starts up SDL and creates window
bool init();
@gldraphael
gldraphael / line.cpp
Created September 25, 2015 20:33
Simple Line Drawing Algorithm using graphics.h
#include <iostream.h>
#include <math.h>
#include <conio.h>
#include <graphics.h>
#include <dos.h>
int sign(float args)
{
if (args < 0)
return -1;