Skip to content

Instantly share code, notes, and snippets.

View evansekeful's full-sized avatar
🤠
building stuff to solve my own annoyances

Ellie Evans evansekeful

🤠
building stuff to solve my own annoyances
View GitHub Profile
#!/bin/bash
curl -s -H "Authorization: Bearer $(curl -s --json '{"identifier": "aliceisjustplaying.bsky.social", "password": "letmein"}' https://bsky.social/xrpc/com.atproto.server.createSession | jq -j ".accessJwt")" "https://bsky.social/xrpc/com.atproto.server.getAccountInviteCodes" | jq -r '.codes[].uses[].usedBy' | xargs -I{} -P10 curl -s 'https://plc.directory/{}' | jq -r '.alsoKnownAs[0]' | sed -e 's#at://#@#'
@MaxHalford
MaxHalford / ogd-in-sql.ipynb
Created March 7, 2023 12:32
Online gradient descent written in SQL
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@msramalho
msramalho / download_tweet_replies.js
Last active November 16, 2022 22:06
Download all replies to a tweet in a browser, by continuously scrolling on the page, using JavaScript
/**
* Instructions:
* copy past this into a console on twitter.com, in a tweet's page.
* Then keep scrolling until the end of the page, a console.log will show you how many tweets you have saved
* 5 seconds after you stop scrolling or reach the end, a file will be downloaded with all the tweet's info
*/
let get_tweet = (e) => {
try {
let textInstances = e.querySelectorAll("div[dir='auto']");
@gaearon
gaearon / modern_js.md
Last active April 18, 2024 15:01
Modern JavaScript in React Documentation

If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:

  • We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
  • We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active May 9, 2024 22:33
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).
@evansekeful
evansekeful / amazon-ec2-fullsetup.md
Last active January 21, 2019 16:09
Quick Commands for Setting Up AWS EC2 Website Server - Amazon Linux2

This is an abbreviated guide based on Amazon's tutorials and piecemealed advice from around the web to set-up a standard website server instance with EC2. For complete explanations regarding Amazon LAMP, visit this link: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-lamp-amazon-linux-2.html

Security Inbound Rules:

HTTP 80 0.0.0.0/0
HTTPS 443 0.0.0.0/0
Custom TCP Rule 1024 - 1048 0.0.0.0/0
Custom TCP Rule 20 - 21 0.0.0.0/0

@evansekeful
evansekeful / excel_formulas_ref.txt
Last active October 15, 2022 03:19
Excel Formulas
# Toggle absolute reference
F4
# Strikethrough hotkey
Ctrl + 5
# Check if value is in a sheet/column A, return bool
=IF(ISERROR(VLOOKUP(A2,'Sheet1'!A:A, 1, FALSE)),FALSE,TRUE )
@DianaEromosele
DianaEromosele / Change "origin" of your GIT repository
Created August 7, 2016 00:31
Change "origin" of your GIT repository
$ git remote rm origin
$ git remote add origin git@github.com:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master
<?php
/*
Plugin Name: Instrument Hooks for WordPress
Description: Instruments Hooks for a Page. Outputs during the Shutdown Hook.
Version: 0.1
Author: Mike Schinkel
Author URI: http://mikeschinkel.com
*/
if (isset($_GET['instrument']) && $_GET['instrument']=='hooks') {
@gunjanpatel
gunjanpatel / amazon-ec2-ftp.md
Last active October 10, 2023 15:31
amazon ec2 LAMP and FTP installation and setup