Skip to content

Instantly share code, notes, and snippets.

@DevSw
DevSw / autorotate.py
Created April 17, 2017 22:26 — forked from anonymous/autorotate.py
Lenovo Yoga 15 Auto Rotate
#!/usr/bin/env python
##############################################################################
# TODO:
# * create gnome dock w/ status, pause, and lock-rotation options
# * documentation
##############################################################################
from glob import glob
import logging
import os
import signal
@DevSw
DevSw / ObservableDictionary.cs
Created September 27, 2018 08:32 — forked from kzu/ObservableDictionary.cs
An ObservableDictionary<TKey, TValue>
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Diagnostics;
using System.Dynamic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@DevSw
DevSw / TextFileEncodingDetector.cs
Created January 22, 2019 09:34 — forked from TaoK/TextFileEncodingDetector.cs
Simple class to automatically detect text file encoding, with English-biased "best guess" heuristic based on byte patterns in the absence of BOM.
using System;
using System.Text;
using System.Text.RegularExpressions;
using System.IO;
namespace KlerksSoft
{
public static class TextFileEncodingDetector
{
/*
@DevSw
DevSw / Generic Volume License Key.txt
Created May 12, 2019 13:51 — forked from CHEF-KOCH/Generic Volume License Key.txt
Microsoft Office 2019 RTM RETAIL Direct Links for Download
https://docs.microsoft.com/en-us/DeployOffice/vlactivation/gvlks
=================================================================
Office Professional Plus 2019 NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP
Office Standard 2019 6NWWJ-YQWMR-QKGCB-6TMB3-9D9HK
Project Professional 2019 B4NPR-3FKK7-T2MBV-FRQ4W-PKD2B
Project Standard 2019 C4F7P-NCP8C-6CQPT-MQHV9-JXD2M
Visio Professional 2019 9BGNQ-K37YR-RQHF2-38RQ3-7VCBB
Visio Standard 2019 7TQNQ-K3YQQ-3PFH7-CCPPM-X4VQ2
Access 2019 9N9PT-27V4Y-VJ2PD-YXFMF-YTFQT
Excel 2019 TMJWT-YYNMB-3BKTF-644FC-RVXBD
@DevSw
DevSw / MSSQL_RepetitiveReplace_fn.sql
Created November 6, 2020 12:10 — forked from jkdba/MSSQL_RepetitiveReplace_fn.sql
Simple function to recursively replace a pattern in a string.
CREATE FUNCTION dbo.RepetitiveReplace_fn
(
@P_String VARCHAR(MAX),
@P_Pattern VARCHAR(MAX),
@P_ReplaceString VARCHAR(MAX),
@P_ReplaceLength INT = 1
)
RETURNS VARCHAR(MAX)
BEGIN
DECLARE @Index INT;
@DevSw
DevSw / listeNationalité.php
Created February 22, 2021 10:46 — forked from clawfire/listeNationalité.php
Liste des nationalités en Francais
<?php
array(
array('id' => 1, 'title' => _('Afghane')),
array('id' => 2, 'title' => _('Albanaise')),
array('id' => 3, 'title' => _('Algerienne')),
array('id' => 4, 'title' => _('Allemande')),
array('id' => 5, 'title' => _('Americaine')),
array('id' => 6, 'title' => _('Andorrane')),
array('id' => 7, 'title' => _('Angolaise')),
array('id' => 8, 'title' => _('Antiguaise et barbudienne')),
@DevSw
DevSw / Getting file names in a batch script.md
Created March 13, 2024 14:19 — forked from ScribbleGhost/Getting file names in a batch script.md
How to print file names with and without extensions in a Windows batch script. With relative or full path.

Getting file names in a batch script

Remember:

  • Replace double precentages with single precentage if you want to use it in CMD directly.
  • When file names are printed out, they already include double quotes.
@echo off