Skip to content

Instantly share code, notes, and snippets.

@ProfessorTom
ProfessorTom / main.c
Last active May 7, 2016 02:52
simplest C/C++ program
#include <iostream>
int main() {
return 0;
}
localeIdentifier Description
eu Basque
hr_BA Croatian (Bosnia & Herzegovina)
en_CM English (Cameroon)
rw_RW Kinyarwanda (Rwanda)
en_SZ English (Swaziland)
tk_Latn Turkmen (Latin)
he_IL Hebrew (Israel)
ar Arabic
uz_Arab Uzbek (Arabic)
@ProfessorTom
ProfessorTom / Contract Killer 3.md
Created March 14, 2017 14:30 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

using Newtonsoft.Json;
using NUnit.Framework;
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PermitAPITest
{
[TestFixture]

iOS, The Future Of macOS, Freedom, Security And Privacy In An Increasingly Hostile Global Environment

This post by a security researcher who prefers to remain anonymous will elucidate concerns about certain problematic decisions Apple has made and caution about future decisions made in the name of “security” while potentially hiding questionable motives. The content of this article represents only the opinion of the researcher. The researcher apologises if any content is seen to be inaccurate, and is open to comments or questions through PGP-encrypted mail.



TL;DR

@ProfessorTom
ProfessorTom / __tests__getStuff-test.js
Created August 30, 2020 20:02 — forked from jsdf/__tests__getStuff-test.js
Writing and testing async JS with Jest, promises and async functions
jest.dontMock('../getStuff');
describe('getStuff', () => {
let getStuff;
let request;
let stuffStore;
it('loads the data', () => {
const id = 1;
const data = {a: 1};
@ProfessorTom
ProfessorTom / UICollectionViewScroll.swift
Created September 8, 2020 22:42 — forked from jlnquere/UICollectionViewScroll.swift
XCUITests: scroll UICollectionView to find one of it's offscreen UICollectionViewCell by id
// Thanks to @MonsieurDart for the idea :)
func scroll(collectionView:XCUIElement, toFindCellWithId identifier:String) -> XCUIElement? {
guard collectionView.elementType == .collectionView else {
fatalError("XCUIElement is not a collectionView.")
}
var reachedTheEnd = false
var allVisibleElements = [String]()
while !reachedTheEnd {
@ProfessorTom
ProfessorTom / falsehoods-programming-time-list.md
Created December 2, 2020 15:39 — forked from timvisee/falsehoods-programming-time-list.md
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@ProfessorTom
ProfessorTom / struct_vs_inheritance.swift
Created February 3, 2021 18:42 — forked from AliSoftware/struct_vs_inheritance.swift
Swift, Struct & Inheritance: How to balance the will of using Struct & Value Types and the need for Inheritance?
// #!Swift-1.1
import Foundation
// MARK: - (1) classes
// Solution 1:
// - Use classes instead of struct
// Issue: Violate the concept of moving model to the value layer
// http://realm.io/news/andy-matuschak-controlling-complexity/
@ProfessorTom
ProfessorTom / README.MD
Created March 4, 2021 17:22 — forked from lmarkus/README.MD
Extracting / Exporting custom emoji from Slack

Extracting Emoji From Slack!

Slack doesn't provide an easy way to extract custom emoji from a team. (Especially teams with thousands of custom emoji) This Gist walks you through a relatively simple approach to get your emoji out.

If you're an admin of your own team, you can get the list of emoji directly using this API: https://api.slack.com/methods/emoji.list. Once you have it, skip to Step 3

HOWEVER! This gist is intended for people who don't have admin access, nor access tokens for using that list.

Follow along...