Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@amjad
amjad / OptimizeSqlFile.cs
Created June 16, 2018 19:49 — forked from jbe2277/OptimizeSqlFile.cs
Convert SQL Compact Edition database file to SQLite database file
// === Convert SQL Compact Edition database file to SQLite database file ===
// Dump SQL Compact Edition data to SQLite compatible SQL file
// - Command line tools: https://github.com/ErikEJ/SqlCeToolbox/wiki/Command-line-tools
// - ExportSQLCE40.exe "Data Source=D:\Northwind.sdf;" Northwind.sql sqlite
// The SQL file created by the SqlCeToolbox contains GUID data as text.
// - Connection string with GUID as text: https://www.connectionstrings.com/sqlite/
// Data Source=c:\mydb.db;Version=3;BinaryGUID=False;
// - Recommended is to store GUID data as binary instead of text (requires less space)
@amjad
amjad / SlackClient.cs
Created February 5, 2019 21:51 — forked from jogleasonjr/SlackClient.cs
A simple C# class to post messages to a Slack channel. You must have the Incoming WebHooks Integration enabled. This class uses the Newtonsoft Json.NET serializer available via NuGet. Scroll down for an example test method and a LinqPad snippet. Enjoy!
using Newtonsoft.Json;
using System;
using System.Collections.Specialized;
using System.Net;
using System.Text;
//A simple C# class to post messages to a Slack channel
//Note: This class uses the Newtonsoft Json.NET serializer available via NuGet
public class SlackClient
{
@amjad
amjad / json_sync_acf_fields.php
Last active October 1, 2021 09:42 — forked from superpositif/jp_sync_acf_fields.php
Automatically update Advanced Custom Fields field groups via JSON
<?php
/**
*
* Function that will automatically remove ACF field groups via JSON file update
*
*/
function acf_auto_suppr($json_dirs) {
$groups = acf_get_field_groups();
if (empty($groups)) {