Skip to content

Instantly share code, notes, and snippets.

View GSoster's full-sized avatar
🎹
I'm either playing keyboard or coding.

Guilherme Soster GSoster

🎹
I'm either playing keyboard or coding.
View GitHub Profile
@GSoster
GSoster / basic-point.cs
Last active January 14, 2019 19:46
blog post - shallow vs deep copy
Public Point
{
public int X { get; set; }
public int Y { get; set; }
public Point(int x, int y)
{
X = x;
Y = y;
}
@GSoster
GSoster / Point.cs
Last active January 14, 2019 17:13
Blog Post - CSharp Operator Overloading
Point{}
@GSoster
GSoster / comparison.cs
Last active January 14, 2019 17:58
dotnetOperatorOverloading1
public static bool operator > (Point a, Point b)
{
return a.X > b.X;
}
public static bool operator < (Point a, Point b)
{
return a.X < b.X;
}
@GSoster
GSoster / constructor-complete.js
Last active January 16, 2019 13:21
roll-a-die blog post
constructor(props) {
super(props);
this.state = {
faceValue: 0,
face: "&#x2680;",
rollCount: 1,
isRolling: false,
};
this.DiceRoll = this.DiceRoll.bind(this);
this.HandleDiceThrow = this.HandleDiceThrow.bind(this);
@GSoster
GSoster / using-keyword-compiler-translated.cs
Last active September 22, 2017 14:36
using-keyword-blog-post
{
StreamReader sr = new StreamReader(filename);
try
{
String text = sr.ReadToEnd();
return text;
}
finally
{
if (sr != null)
@GSoster
GSoster / array-reduce-empty.js
Last active September 22, 2017 13:29
Array.reduce in Javascript - blog post
[].reduce(function(a, b){
return a + b;
});