Skip to content

Instantly share code, notes, and snippets.

View 0xTheProDev's full-sized avatar

👨🏻‍💻 TheProDev 🇮🇳 0xTheProDev

View GitHub Profile
## Note: Tested on Linux only as of now.
How to use?
1. There should be an alert.mp3 file in your directory for the sound to be played.
2. Use a python virtualenv to install requirements.
3. Just run the system_honeypot.py file.
const std = @import("std");
const Timer = struct {
expiration: u64,
callback: *const fn () void,
};
const TimingWheel = struct {
buckets: [][]Timer,
current_time: u64,
@getify
getify / 1.js
Last active September 6, 2024 19:05
Converting English number sentences ("one hundred forty two point three") to numeric digits ("142.3")
convert("one hundred five"); // "105"
convert("six hundred and fifty three"); // "653"
convert("zero zero one two three"); // "123"
convert("twelve o three"); // "1203"
convert("thirteen zero nine"); // "1309"
convert("fifteen sixteen"); // "1516"
convert("fourteen ninety two"); // "1492"
convert("nineteen ten"); // "1910"
convert("twelve hundred"); // "1200"
convert("twenty three hundred"); // "2300"

What Hiring Should Look Like

This is definitely not the first time I've written about this topic, but I haven't written formally about it in quite awhile. So I want to revisit why I think technical-position interviewing is so poorly designed, and lay out what I think would be a better process.

I'm just one guy, with a bunch of strong opinions and a bunch of flaws. So take these suggestions with a grain of salt. I'm sure there's a lot of talented, passionate folks with other thoughts, and some are probably a lot more interesting and useful than my own.

But at the same time, I hope you'll set aside the assumptions and status quo of how interviewing is always done. Just because you were hired a certain way, and even if you liked it, doesn't mean that it's a good interview process to repeat.

If you're happy with the way technical interviewing currently works at your company, fine. Just stop, don't read any further. I'm not going to spend any effort trying to convince you otherwise.

@nickbclifford
nickbclifford / auto-deploying.md
Last active May 15, 2023 09:02
How to automatically deploy code to a server using Travis CI

Auto-Deploying via Travis CI

Because Travis CI can automatically execute scripts after successfully (or unsuccessfully!) executing tests, it is an obvious choice for a deployment tool. In order to deploy to a Git repository on a remote server, the process generally is as follows:

  • Set up SSH keys
  • Add the server's copy of the repository as a Git remote
  • Push to the remote
  • SSH into the server and execute any installation/compilation/miscellaneous commands

Before even touching .travis.yml...

Users

@nightfox
nightfox / Redis as a Service
Last active March 10, 2019 01:12
Installing Redis Server as a service
sudo vim /etc/redis/redis.conf
Change the following lines
daemonize yes
bind 127.0.0.1
dir /var/lib/redis
wget https://gist.github.com/nightfox/8153193/raw/553c375424866e8d0d0bd5b48d23578c93031bce/redis-server
@rcaetano
rcaetano / gist:5999184
Last active January 16, 2024 18:46 — forked from cluePrints/gist:2521535
Configure Amazon Linux EC2

Steps

  • Build tools:

      sudo yum groupinstall "Development Tools"
      sudo yum install openssl openssl-devel
      sudo yum install git-core
    
  • Dependencies: