Skip to content

Instantly share code, notes, and snippets.

@shubheksha
shubheksha / brackets-pair-colorizer.md
Last active May 1, 2023 18:05
A list of extensions/plugins that highlight matching parens/braces for various editors/IDEs.
@drewcassidy
drewcassidy / BinarySearch.java
Last active June 8, 2017 20:58
stupid binary search for my AP Computer Science class in High School
public class BinarySearch {
public int find(int[] arr, int v) {
int i = 0;
int b = (1 << (Double.doubleToLongBits(arr.length - 1) >> 51));
while ((b >>>= 1) > 0) {
if ((i | b) < arr.length && arr[i | b] <= v) i |= b;
if (arr[i] == v) return i;
}
@philippkeller
philippkeller / shell-multiple-choice-quiz.py
Created July 28, 2016 13:04
base code of stage 1 and 2 of sysengquiz3
import urwid, random, re, time
blank = urwid.Divider()
palette = [
('body','light gray','black', 'standout'),
('reverse','light gray','black'),
('header','white','dark red', 'bold'),
('important','dark red','black',('standout','underline')),
('editfc','white', 'dark blue', 'bold'),
('editbx','light gray', 'dark blue'),
[17:33] <joepie91> so like, the big problem with IPFS-based things is that nobody feels responsible for maintaining availability
[17:33] <joepie91> which is fine for popular things like torrents with thousands of seeds
[17:33] <joepie91> but not for small/uncommon things
[17:33] <joepie91> there's no central server with a backup regime which is responsible for availability
[17:33] <joepie91> in one way, that is a feature
[17:34] <joepie91> but in another way, it means that none of the peers are likely to have a similar availability regime or guarantee
[17:34] <joepie91> because everybody thinks "oh, it's distributed, I can just rely on the other peers"
[17:34] <joepie91> it's a game theory problem really, and unless it's solved, this trend of building everything on top of IPFS is going to result in *massive* data loss in the next 2-3 years
@joepie91
joepie91 / vpn.md
Last active March 26, 2024 20:19
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@drewcassidy
drewcassidy / aBot
Last active August 29, 2015 14:25
fun with the Voight Kampff test
(] is a bot)
<cinebox>karkat: You’re in a desert walking along in the sand when all of the sudden you look down, and you see a tortoise, it’s crawling toward you. You reach down, you flip the tortoise over on it's back. The tortoise lays on it's back, it's belly baking in the hot sun, beating it's legs trying to turn it'self over, but it can’t, not without your help. But you’re not helping. Why is that?
<]>THE FASHION 4CHAN BOARD
<cinebox>oh
<cinebox>ok
@atcuno
atcuno / gist:3425484ac5cce5298932
Last active March 25, 2024 13:55
HowTo: Privacy & Security Conscious Browsing

The purpose of this document is to make recommendations on how to browse in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.

I welcome contributions and comments on the information contained. Please see the How to Contribute section for information on contributing your own knowledge.

Table of Contents

Thank you for contacting us concerning this issue. We are aware that at the
moment there are some peering problems in some certain areas in the US.
Please rest assure that this issue is not related to us but rather a problem
with your ISP
We have gotten phone calls and other tickets bringing this to our concern. We
are investigating and monitoring this issue at the moment.
To help us investigate it better, you may provide us a traceroute from your
computer to your server. Also, if possible, a tracerout from your server to
your computer(or the computer that is having trouble connecting). This will
highly be appreciated.
@Garris0n-
Garris0n- / gist:d667ec05fe47e25674b7
Created October 9, 2014 03:16
people whose lists I trust
hintss
@garbados
garbados / gist:f82604ea639e0e47bf44
Created July 27, 2014 23:07
Falsehoods Programmers Believe About Gender
  1. There are two and only two genders.
  2. Okay, then there are two and only two biological genders.
  3. Gender is determined solely by biology.
  4. Okay, it’s mostly determined by biology, right?
  5. Please tell me it’s determined by DNA.
  6. Gender can be reliably determined through visual means. After all, no man would ever wear a burka.
  7. Once gender is set, it never changes.
  8. Even if the gender can change, it will only change from the one value to the other value.
  9. Only one gender can be “active” at the same time.
  10. We’re tracking gender now, so we’ve always tracked it.