Skip to content

Instantly share code, notes, and snippets.

View jltrem's full-sized avatar

Joe Tremblay jltrem

  • College Station, TX
View GitHub Profile
@minhcasi
minhcasi / Flutter Clean.md
Last active April 25, 2024 02:33
These are common issues on Flutter and solutions to fix

Quick Clean Cache

  1. Open android studio Tools->Flutter->Clean
  2. Go to File -> Invalidate Caches / Restart
  3. Or open terminal run "flutter clean"
  4. Remove pubspec.lock
  5. Double check the Flutter SDK Path config correcty - https://tppr.me/qn6dP

Or open the terminal and try this script:

flutter clean
@sheldonhull
sheldonhull / asciidoc-azure-pipelines.yaml
Last active January 23, 2024 15:04
asciidoc-azure-pipelines.yaml Example of using azure devops yaml pipeline to publish documentation to confluence from a repo. docs-as-code for the win.
name: $(BuildDefinitionName).$(DayOfYear)$(Rev:.r).$(Build.RequestedFor)
trigger:
branches:
include:
- master
pr: none # don't trigger on pr, only when merging to master
pool:
@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active June 14, 2024 17:31
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

##recursive add all git add --all

##commit git commit -m "this is the commit message"

##squash git reset --soft HEAD~2 && git commit where 2 is the number of commits to squash

@jankurianski
jankurianski / ControlSnapshot.cs
Created December 2, 2014 07:18
Takes a screenshot of a Windows Forms control using BitBlt, making it work with CefSharp's WinForms.ChromiumWebBrowser
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.Runtime.InteropServices;
using System.Windows.Forms;
public class ControlSnapshot
{
public static Bitmap Snapshot(Control c)
{
@jltrem
jltrem / CopyProperties.cs
Last active August 29, 2015 14:04
method to create an object and copy the properties from another object into it
// expected usage: var tableRec = Utils.CopyProperties<StatDbRecord>(fileRow, typeof(IStat));
static public class Utils
{
static public TDst CopyProperties<TDst>(object src, Type hasProps) where TDst : class, new()
{
var dst = new TDst();
foreach (var propInf in hasProps.GetProperties())
{
var val = propInf.GetValue(src, null);
@jltrem
jltrem / ValidateEmailAddress.cs
Created August 3, 2014 01:30
validate an email address
string regex = @"\A(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)\Z";
bool isEmail = Regex.IsMatch(emailString, regex, RegexOptions.IgnoreCase);
static class EntityHelper
{
/// <summary>
/// Makes a shallow copy of an entity object. This works much like a MemberwiseClone()
/// but directly instantiates a new object and copies only properties that work with
/// EF and don't have the NotMappedAttribute.
///
/// ** It also avoids copying the EF's proxy reference that would occur by using MemberwiseClone() **
///
@staltz
staltz / introrx.md
Last active June 21, 2024 12:27
The introduction to Reactive Programming you've been missing
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream