Skip to content

Instantly share code, notes, and snippets.

@mastermndio
mastermndio / .tf
Created March 4, 2021 00:18
Linode server
#Define a provider
terraform {
required_providers {
linode = {
source = "linode/linode"
version = "1.14.3"
}
}
}
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active September 23, 2024 03:59 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export to tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

@haacked
haacked / download-nuget-licenses.ps1
Last active September 5, 2022 16:35
A PowerShell script to download your NuGet package licenses as first seen in http://haacked.com/archive/2015/03/28/download-nuget-package-licenses/
Split-Path -parent $dte.Solution.FileName | cd
New-Item -ItemType Directory -Force -Path ".\licenses"
@( Get-Project -All | ? { $_.ProjectName } | % { Get-Package -ProjectName $_.ProjectName } ) | Sort -Unique Id | % { $pkg = $_ ; Try { (New-Object System.Net.WebClient).DownloadFile($pkg.LicenseUrl, (Join-Path (pwd) 'licenses\') + $pkg.Id + ".html") } Catch [system.exception] { Write-Host "Could not download license for $($pkg.Id)" } }
@maxivak
maxivak / 00. tutorial.md
Last active September 11, 2024 19:58
Importing/Indexing database (MySQL or SQL Server) in Solr using Data Import Handler
@dstroot
dstroot / app.js
Created July 13, 2014 16:29
Gulp, BrowserSync, Node, and Nodemon all working in harmony. ;)
/**
* World's simplest express server
* - used to serve index.html from /public
*/
var express = require('express');
var serveStatic = require('serve-static');
var app = express();
app.use(serveStatic(__dirname + '/public'));
@mythz
mythz / 01-WebApiProducts.cs
Created October 13, 2012 23:40
Your First ASP.NET Web API Products Example vs ServiceStack
/* Tutorial example from:
* Your First ASP.NET Web API (C#):
* http://www.asp.net/web-api/overview/getting-started-with-aspnet-web-api/tutorial-your-first-web-api
*/
namespace HelloWebAPI.Controllers
{
public class ProductsController : ApiController
{
Product[] products = new Product[]
{
@mythz
mythz / Funq_Can_AutoWire.cs
Created May 29, 2012 06:39
StackOverflow Funq IOC code example
//Had to make these types from the example since the example didn't compile and they weren't supplied
public interface IFoo { }
public interface IFoo2 { }
public interface IBar { }
public class Foo : IFoo { }
public class Bar : IBar { }
public class Test
{
public IFoo Foo { get; set; }
@sayedihashimi
sayedihashimi / msbuild-get-date.proj
Created March 23, 2012 03:02
MSBuild how to get a good formatted date
<Project
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="4.0"
DefaultTargets="Demo" >
<Target Name="Demo">
<PropertyGroup>
<CurrentDate>$([System.DateTime]::Now.ToString(yyyyMMdd-mmss))</CurrentDate>
</PropertyGroup>

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: