Skip to content

Instantly share code, notes, and snippets.

View phaseOne's full-sized avatar

Evan Bovie phaseOne

View GitHub Profile
@countingpine
countingpine / tvsread.c
Created November 3, 2018 23:47
tvsread.c - dump contents of KEY chunks in TeamViewer ".tvs" videos
/* tvsread.c: lists KEY chunks in video and uncompresses them to ./key1.data, ./key2.data, ... */
/* See also http://www.jerrysguide.com/tips/demystify-tvs-file-format.html, https://stackoverflow.com/a/53135938/446106 */
/* Fairly quick and dirty. Tested with a Version 5 video from TeamViewer 13. */
/* compile with gcc -lz tvsread.c */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <zlib.h>
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active May 12, 2025 11:23 — 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 your 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.

@lukeplausin
lukeplausin / bash_aws_jq_cheatsheet.sh
Last active January 4, 2025 17:42
AWS, JQ and bash command cheat sheet. How to query, cut and munge things in JSON generally.
# Count total EBS based storage in AWS
aws ec2 describe-volumes | jq "[.Volumes[].Size] | add"
# Count total EBS storage with a tag filter
aws ec2 describe-volumes --filters "Name=tag:Name,Values=CloudEndure Volume qjenc" | jq "[.Volumes[].Size] | add"
# Describe instances concisely
aws ec2 describe-instances | jq '[.Reservations | .[] | .Instances | .[] | {InstanceId: .InstanceId, State: .State, SubnetId: .SubnetId, VpcId: .VpcId, Name: (.Tags[]|select(.Key=="Name")|.Value)}]'
# Wait until $instance_id is running and then immediately stop it again
aws ec2 wait instance-running --instance-id $instance_id && aws ec2 stop-instances --instance-id $instance_id
# Get 10th instance in the account
@leommoore
leommoore / mongodb_3.2.x_replica_sets_on_aws_ec2.md
Last active March 15, 2022 22:28
MongoDB 3.2.x Replica Sets on AWS EC2

#MongoDB 3.2.x Replica Sets on AWS EC2 A MongoDB replica set provides a mechanism to allow for a reliable database services. The basic replica set consists of three servers, a primary, a secondary and an arbitrator. The primary and secondary both hold a copy of the data. The arbitrator is normally a low spec server which just monitors the other servers and help with the failover process. In production, there can be more than three servers.

To setup mongo as a replica set on Amazon Web Services EC2 you need to first setup a security group with ssh on port 22 and mongodb on port 27017. You then need to create three servers. Select Ubuntu 14.04 LTS x64 and a micro (or bigger depending on your database size, ideally you should have enough memory to match your database size) instance for the primary and secondary and a nano instance for the arbitrator.

##Adjust the File System on each Server The operating system by default will update the last access time on a file. In a high data throughput database application

@joaocampinhos
joaocampinhos / tech.js
Last active February 22, 2019 08:54
Disable MIT Technology Review (https://www.technologyreview.com/) paywall
var h=document.head,s=document.createElement('style');s.type='text/css',s.appendChild(document.createTextNode('.entry-login,.meter{display:none}article,.article-body__content{height:auto!important}.article-body__content:before{content:none!important}')),h.appendChild(s);
@ikonst
ikonst / NSData+GStreamer.h
Created July 1, 2015 13:12
NSData+GStreamer
@import Foundation;
#include <gst/gst.h>
@interface NSData (GStreamer)
- (GstBuffer *)gstBuffer;
@end
@interface NSMutableData (GStreamer)
@suakig
suakig / PostBuildProcess.cs
Last active August 23, 2021 15:20
PostBuildProcess.cs
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;
using System.IO;
using System.Collections.Generic;
public class PostBuildProcess : MonoBehaviour
{
internal static void CopyAndReplaceDirectory(string srcPath, string dstPath)
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 16, 2025 11:19
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname