Skip to content

Instantly share code, notes, and snippets.

View heiswayi's full-sized avatar
👽

Heiswayi Nrird heiswayi

👽
View GitHub Profile
@heiswayi
heiswayi / gist:34d0de1ddfa72fb53e7e
Created October 14, 2015 01:48 — forked from jwoschitz/gist:1129249
Brute force implementation / C#
class Program
{
#region Private variables
// the secret password which we will try to find via brute force
private static string password = "p123";
private static string result;
private static bool isMatched = false;

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@heiswayi
heiswayi / gist:7775ec456f2e98b739a6c556a19e0cb1
Created April 26, 2018 04:58 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@heiswayi
heiswayi / Bindable.cs
Created June 5, 2016 21:32 — forked from btshft/Bindable.cs
Bindable class to reduce boilerplate code in mvvm (implement INotifyPropertyChanged)
namespace Helpers
{
///<summary>
/// Reduce mvvm boilerplate
///
/// Usage:
/// public class MyViewModel : Bindable {
/// // Now this property supports INotifyPropertyChanged
/// public string MyProperty
/// {
@heiswayi
heiswayi / html-style-guide.md
Created September 23, 2015 05:39 — forked from ryansechrest/html-style-guide.md
HTML style guide with coding standards and best practices.

HTML Style Guide

All rules and guidelines in this document apply to HTML files.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Icon Legend:

· Space, Tab, Enter/Return

@heiswayi
heiswayi / LargestTriangleThreeBuckets.cs
Created August 22, 2019 11:58 — forked from DanielWJudge/LargestTriangleThreeBuckets.cs
Largest-Triangle-Three Bucket Downsampling Graphs in C#
public static IEnumerable<Tuple<double, double>> LargestTriangleThreeBuckets(List<Tuple<double, double>> data, int threshold)
{
int dataLength = data.Count;
if (threshold >= dataLength || threshold == 0)
return data; // Nothing to do
List<Tuple<double, double>> sampled = new List<Tuple<double, double>>(threshold);
// Bucket size. Leave room for start and end data points
double every = (double)(dataLength - 2) / (threshold - 2);
@heiswayi
heiswayi / privacy-policy.md
Last active February 11, 2021 13:57 — forked from maddisondesigns/cookie-policy.md
eCommerce Terms & Conditions and Privacy Templates

Privacy Policy

1. We respect your privacy

Business Name respects your right to privacy and this policy sets out how we collect and treat your personal information. “Personal information” is information we hold which is identifiable as being about you.

2. What personal information we collect

@heiswayi
heiswayi / FocusExtension.cs
Created June 5, 2016 21:30 — forked from chuckdee68/FocusExtension.cs
FocusExtension - Focusing Controls in View from ViewModel using MVVM principles
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
namespace Supporting
{
@heiswayi
heiswayi / php-style-guide.md
Created September 23, 2015 05:38 — forked from ryansechrest/php-style-guide.md
PHP style guide with coding standards and best practices.

PHP Style Guide

All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts
@heiswayi
heiswayi / .htaccess
Last active June 15, 2023 17:03 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
# 301 Redirects for .htaccess
# ===========================
# Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
# Redirect an entire site:
Redirect 301 / http://www.domain.com/
# Redirect an entire site to a subfolder