Skip to content

Instantly share code, notes, and snippets.

View tijme's full-sized avatar
:octocat:
I offer code 'n stuff, in exchange for some premium quality kudos!

Tijme Gommers tijme

:octocat:
I offer code 'n stuff, in exchange for some premium quality kudos!
View GitHub Profile
@tijme
tijme / FileZillaXML.php
Last active June 28, 2017 15:14
Manage FileZilla servers using PHP
<?php
/**
* FileZillaXML library
*
* ### DESCRIPTION
*
* With the FileZillaXML library you can easily create an XML with servers and folders that can be
* imported into FileZilla.
*
@tijme
tijme / UITextViewPlaceholder.swift
Last active November 5, 2024 05:49
The correct way to implement a placeholder in a UITextView (Swift)
//
// UITextViewPlaceholder.swift
// TextViewPlaceholder
//
// Copyright (c) 2017 Tijme Gommers <[email protected]>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@tijme
tijme / iptables.sh
Created September 20, 2017 13:01
Firewall start for `iptables`
# Flush rules
iptables -X
iptables -F
iptables -t nat -X
iptables -t nat -F
iptables -t mangle -X
iptables -t mangle -F
iptables -t raw -X
iptables -t raw -F
iptables -t security -X
@tijme
tijme / ethereum-contract-scam.sol
Last active January 5, 2024 04:07
An example of an Ethereum smart contract used by scammers.
pragma solidity ^0.4.23;
contract NumberBetweenZeroAndTen {
uint256 private secretNumber;
uint256 public lastPlayed;
address public owner;
struct Player {
address addr;
@tijme
tijme / NotificationHelper.swift
Last active May 25, 2019 18:57
Notification/observer helper for Swift. It allows you to e.g. only listen to (observe) a notification once.
//
// NotificationHelper.swift
// Raivo
//
// Created by Tijme Gommers on 24/05/2019.
// Copyright © 2019 Tijme Gommers. All rights reserved.
//
import Foundation
@tijme
tijme / migrating_authy_to_raivo_otp.js
Last active August 15, 2019 08:57
Migrating Authy to Raivo OTP
/*! Based on https://gist.github.com/gboudreau/94bb0c11a6209c82418d01a59d958c93 */
/*! QRious v4.0.2 | (C) 2017 Alasdair Mercer | GPL v3 License
Based on jsqrencode | (C) 2010 [email protected] | GPL v3 License */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.QRious=e()}(this,function(){"use strict";function t(t,e){var n;return"function"==typeof Object.create?n=Object.create(t):(s.prototype=t,n=new s,s.prototype=null),e&&i(!0,n,e),n}function e(e,n,s,r){var o=this;return"string"!=typeof e&&(r=s,s=n,n=e,e=null),"function"!=typeof n&&(r=s,s=n,n=function(){return o.apply(this,arguments)}),i(!1,n,o,r),n.prototype=t(o.prototype,s),n.prototype.constructor=n,n.class_=e||o.class_,n.super_=o,n}function i(t,e,i){for(var n,s,a=0,h=(i=o.call(arguments,2)).length;a<h;a++){s=i[a];for(n in s)t&&!r.call(s,n)||(e[n]=s[n])}}function n(){}var s=function(){},r=Object.prototype.hasOwnProperty,o=Array.prototype.slice,a=e;n.class_="Nevis",n.super
@tijme
tijme / BiometricHelper.swift
Created November 27, 2019 18:18
Helper class for programmatically checking if `Face ID` or `Touch ID` are available.
//
// Raivo OTP
//
// Copyright (c) 2019 Tijme Gommers. All rights reserved. Raivo OTP
// is provided 'as-is', without any express or implied warranty.
//
// Modification, duplication or distribution of this software (in
// source and binary forms) for any purpose is strictly prohibited.
//
// https://github.com/tijme/raivo/blob/master/LICENSE.md
@tijme
tijme / tw33t.py
Last active June 24, 2023 19:18
Steal Twitter credentials via Google Dorks!
#!/usr/bin/env python3
# pip install python-twitter
# pip install colored
# pip install google
import re
import urllib3
import twitter
import requests
@tijme
tijme / ChangeSpellCheckingLanguage.vba
Created September 30, 2020 07:13
Macro to change the language of an entire PowerPoint presentation (including speaker notes)
Option Explicit
Public Sub ChangeSpellCheckingLanguage()
Dim j As Integer, k As Integer, scount As Integer, fcount As Integer
scount = ActivePresentation.Slides.Count
For j = 1 To scount
fcount = ActivePresentation.Slides(j).Shapes.Count
For k = 1 To fcount
If ActivePresentation.Slides(j).Shapes(k).HasTextFrame Then
ActivePresentation.Slides(j).Shapes(k).TextFrame2.TextRange.LanguageID = msoLanguageIDEnglishUS
End If
@tijme
tijme / generate-iso-image.py
Last active September 18, 2023 20:07
Generate an ISO image/file using Python on Windows
# pip install pycdlib
try:
from cStringIO import StringIO as BytesIO
except ImportError:
from io import BytesIO
import pycdlib
iso = pycdlib.PyCdlib()