Skip to content

Instantly share code, notes, and snippets.

View krzysztofjeziorny's full-sized avatar

Krzysztof Jeziorny krzysztofjeziorny

View GitHub Profile
@lopezjurip
lopezjurip / README.md
Last active September 10, 2023 06:27
Write to NTFS on OSX Yosemite and El Capitan

OUTDATED, see comments below

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Update Homebrew formulae:

brew update
@shacker
shacker / import_drupal_pages.py
Created August 20, 2015 18:44
Django management command to import flat Drupal page sets into a wagtail tree
from datetime import datetime
import json
import requests
import sys
from bs4 import BeautifulSoup
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
@adactio
adactio / basicServiceWorker.js
Last active March 27, 2023 09:30
A basic Service Worker, for use on, say, a blog.
'use strict';
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
// http://creativecommons.org/publicdomain/zero/1.0/
(function() {
// Update 'version' if you need to refresh the cache
var staticCacheName = 'static';
var version = 'v1::';
@cellularmitosis
cellularmitosis / create_yosemite_iso.sh
Last active March 14, 2016 11:59
create_yosemite_iso.sh: Create a bootable .iso OS X Yosemite installer (for use with e.g. VirtualBox)
#!/bin/bash
# create_yosemite_iso.sh: Create a bootable .iso OS X Yosemite installer (for use with e.g. VirtualBox)
# See https://gist.github.com/cellularmitosis/6e902579296e82ec6273
# This is a (slightly) edited version of IOOI SqAR's script.
# See http://sqar.blogspot.de/2014/10/installing-yosemite-in-virtualbox.html
# Changes from IOOI SqAR's script include:
# * Use 'hdiutil makehybrid' to convert the .cdr image to a "real" .iso image.
@chrisvoncsefalvay
chrisvoncsefalvay / example_file.html
Created September 27, 2016 21:29
Insert SVG as <object> in Django
{% load i18n static template_tags %}
<html>
<head>
<title>Hello, world!</title>
</head>
<body>
<h1>This is an SVG, inserted as an object.</h1>
{% svgobject 'images/svg/test.svg' 'test-class-one' 'test-class-two' %}
</body>
@robinsloan
robinsloan / unfave.rb
Last active November 6, 2024 14:29
Unfave script, because why not??
#!/usr/bin/env ruby
require "rubygems"
require "twitter"
require "json"
require "faraday"
# things you must configure
TWITTER_USER = "your_username"
# get these from dev.twitter.com
@cjaoude
cjaoude / bash notes.md
Created January 30, 2017 15:58
Bash, made easy:

Run commands, by condition:

A; B    Run A and then B, regardless of success of A
A && B  Run B if A succeeded
A || B  Run B if A failed
A &     Run A in background.
@tdsymonds
tdsymonds / backbutton-closebootstrap-modal.js
Last active June 1, 2021 08:13 — forked from thedamon/backbutton close bootstrap modal
Cause back button to close Bootstrap modal windows
// For the below to work with the escape key
// I needed to add data-keyboard="false" to the modal
// in the HTML so that the standard bootstrap function
// doesn't fire, the below fires instead
$('div.modal').on('show.bs.modal', function() {
var modal = this;
var hash = modal.id;
window.location.hash = hash;
window.onhashchange = function() {
@sirodoht
sirodoht / migrate-django.md
Last active April 7, 2025 18:34
How to migrate Django from SQLite to PostgreSQL

How to migrate Django from SQLite to PostgreSQL

Dump existing data:

python3 manage.py dumpdata > datadump.json

Change settings.py to Postgres backend.

Make sure you can connect on PostgreSQL. Then:

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.