Skip to content

Instantly share code, notes, and snippets.

@nickfox-taterli
nickfox-taterli / CP2112.cs
Created October 19, 2019 06:57
CP2112 Example
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
@hemalchevli
hemalchevli / bluepill.cfg
Last active July 24, 2023 11:57
OpenOCD config file for Bluepill STM32F103C8T6
#source [find interface/stlink-v2-1.cfg]
source [find interface/stlink-v2.cfg]
transport select hla_swd
source [find target/stm32f1x.cfg]
#reset_config srst_only
reset_config none separate
anonymous
anonymous / himawari.ps1
Created February 3, 2016 23:38
Himawari-8 Downloader corrected by tproger
#
# Himawari-8 Downloader
#
#
#
# This script will scrape the latest image from the Himawari-8 satellite, recombining the tiled image,
# converting it to a JPG which is saved in My Pictures\Himawari\ and then set as the desktop background.
#
# http://himawari8.nict.go.jp/himawari8-image.htm
#
@rexcfnghk
rexcfnghk / RemoveUnderscoreForeignKeyNamingConvention.cs
Last active March 8, 2019 15:06
Naming convention for Entity Framework to remove underscores in foreign key names in many-to-many relationships, improved upon SO answer: http://stackoverflow.com/a/18245172/465056
using System.Collections.Generic;
using System.Data.Entity.Core.Metadata.Edm;
using System.Data.Entity.Infrastructure;
using System.Data.Entity.ModelConfiguration.Conventions;
namespace EFTest.Entities.Conventions
{
public class RemoveUnderscoreForeignKeyNamingConvention : IStoreModelConvention<AssociationType>
{
public void Apply(AssociationType item, DbModel model)
@danesparza
danesparza / gist:973923
Created May 16, 2011 04:02
Gravatar in C# - creating the hash
using System.Security.Cryptography;
/// Hashes an email with MD5. Suitable for use with Gravatar profile
/// image urls
public static string HashEmailForGravatar(string email)
{
// Create a new instance of the MD5CryptoServiceProvider object.
MD5 md5Hasher = MD5.Create();
// Convert the input string to a byte array and compute the hash.
@endolith
endolith / Has weird right-to-left characters.txt
Last active April 30, 2024 12:48
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶