Skip to content

Instantly share code, notes, and snippets.

Finding inspirations...

Heiswayi Nrird heiswayi

Finding inspirations...
View GitHub Profile
heiswayi /
Created Feb 5, 2017
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
heiswayi /
Last active Feb 11, 2021 — forked from maddisondesigns/
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 / SerialPortReader.ps1
Last active Feb 10, 2021
PowerShell Script - Serial Port Reader
View SerialPortReader.ps1
Listens to and read data from a serial port (e.g. COM port)
The purpose of this script is to keep listening and read data from a serial port.
All the data captured will be displayed and log into a file.
./SerialPortReader.ps1 -PortName COM3 -BaudRate 9600
heiswayi / malaysia.geojson
Last active Feb 8, 2021
Malaysia Map GeoJSON
View malaysia.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View dispatch-service.cs
public static class DispatchService
public static void Invoke(Action action)
Dispatcher dispatchObject = Application.Current.Dispatcher;
if (dispatchObject == null || dispatchObject.CheckAccess())
View fixed-sized-queue.cs
public class FixedSizedQueue<T> : ConcurrentQueue<T>
private readonly object syncObject = new object();
public int Size { get; private set; }
public FixedSizedQueue(int size)
Size = size;
View responsive-basic.scss
@media only screen and (max-width: 480px) {
/* Mobile Styles Go Here */
@media only screen and (min-width: 481px) and (max-width: 768px) {
/* Tablet Styles Go Here */
@media only screen and (min-width: 769px) {
/* Desktop Styles Go Here */
View SimpleLogger.cs
MIT License
Copyright (c) 2016 Heiswayi Nrird
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
heiswayi /
Last active Jan 30, 2021
Generic desktop app EULA sample


This End-User License Agreement (EULA) is a legal agreement between you (either as an individual or on behalf of an entity) and [[AUTHOR]] regarding your use of [[APPNAME]]'s desktop applications, and associated documentation (the "Software"). IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS EULA, DO NOT INSTALL, USE OR COPY THE SOFTWARE.


  • You must agree to all of the terms of this EULA to use this Software.
  • If so, you may use the Software for free and for any lawful purpose.
  • This Software automatically communicates with its server for three reasons: (1) to receive and install updates; (2) to send error reports; and (3) to send anonymized usage information. You can view sample data to see what information is sent, and you may opt out of sending the anonymized usage data.
  • This Software is provided "as-is" with no warranties, and you agree that [[AUTHOR]] is not liable for anything you do with it.