Skip to content

Instantly share code, notes, and snippets.

View salimos's full-sized avatar
🇹🇳

SocoM salimos

🇹🇳
View GitHub Profile
@JohnSundell
JohnSundell / StarPlane.swift
Created July 8, 2020 22:41
A simple game written in SwiftUI. Note that this is just a fun little hack, the code is not meant to be taken seriously, and only works on iPhones in portrait mode.
// A fun little game written in SwiftUI
// Copyright (c) John Sundell 2020, MIT license.
// This is a hacky implementation written just for fun.
// It's only verified to work on iPhones in portrait mode.
import SwiftUI
final class GameController: ObservableObject {
@Published var plane = GameObject.plane()
@Published private(set) var clouds = [GameObject]()
@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
var active = false;
function changeRefer(details) {
if (!active) return;
for (var i = 0; i < details.requestHeaders.length; ++i) {
if (details.requestHeaders[i].name === 'Referer') {
details.requestHeaders[i].value = 'http://www.google.com/';
break;
}
@raul
raul / mediahint.js
Last active January 29, 2016 20:12
I like mediahint.com's extension but it relies on this external pac file hosted at https://mediahint.com/default.pac If mediahint.com gets compromised my whole navigation could get proxied without noticing. I'll modify the installed extension (under `~/Library/Application Support/Google/Chrome/Default/Extensions/...` in my Mac) to use a local ve…
function FindProxyForURL(url, host){
var myip = myIpAddress();
var ipbits = myip.split(".");
var myseg = parseInt(ipbits[3]);
if(myseg == Math.floor(myseg/2)*2){
proxy = 'PROXY 165.225.131.153:80; PROXY 165.225.130.193:80';
} else {
proxy = 'PROXY 165.225.130.193:80; PROXY 165.225.131.153:80';
}
if((host == 'localhost')||(shExpMatch(host, 'localhost.*'))||(shExpMatch(host, '*.local'))||(host == '127.0.0.1')){