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 / 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 / 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 / UITextViewPlaceholder.swift
Last active January 7, 2024 03:06
The correct way to implement a placeholder in a UITextView (Swift)
//
// UITextViewPlaceholder.swift
// TextViewPlaceholder
//
// Copyright (c) 2017 Tijme Gommers <tijme@finnwea.com>
//
// 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 / 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.
*