Skip to content

Instantly share code, notes, and snippets.

View khalby786's full-sized avatar
donuts

Khaleel Gibran khalby786

donuts
View GitHub Profile
@adtac
adtac / Dockerfile
Last active May 28, 2024 01:38
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
Twitter ID Screen name Followers Removal observed Before After
17461978 SHAQ 15612791 2022-02-26T22:24:52Z SHAQ.ETH SHAQ.SOL
21910850 jakeowen 2119904 2022-02-26T15:45:18Z jakeowen.eth Jake Owen
7846 ijustine 1811449 2022-03-09T14:43:37Z iJustine.eth iJustineUltra
1666038950 BoredElonMusk 1752290 2022-02-17T08:05:47Z bored.eth Bored
381051960 ethRuby 1267133 2022-03-19T08:08:11Z CryptoSolis.eth Ruby
1282418324228337665 wsbmod 832406 2022-02-24T06:52:07Z wsbmod.eth wsbmod
20882981 EclecticMethod 495235 2022-02-18T04:39:30Z eclecticm.eth Eclectic Method
811350 alexisohanian 479340 2022-02-08T06:31:55Z AlexisOhanian.eth 7️⃣7️⃣6️⃣ Alexis Ohanian 7️⃣7️⃣6️⃣
22784458 Fwiz 410813 2022-03-22T08:54:42Z Ryan Wyatt - fwiz.eth 💜 Ryan Wyatt - @ GDC
@azagniotov
azagniotov / beautiful.rest.api.docs.in.markdown.md
Last active July 22, 2024 18:34
Example to create beautiful REST API docs in Markdown, inspired by Swagger API docs.

Hello there, I regret to inform you that back in June, the glitch team noticed that pinging services affected the stability of glitch by a significant amount so they took action by banning all traffic that appeared to originate from a pinging service. Pinging services may or may not have also been the causes of the frequent outages as outages now happen a lot less frequently after the ban. Another reason was that a lot of money was being wasted, because most projects spend a lot of idle time waiting for requests or in the case of discord bots responding to gateway ping events. The glitch project wakeup system is designed so that a project with no requests in 5 minutes will sleep allowing more apps to run on the platform concurrently and ensuring better stability. You might argue that discord bots don't do that, and you might be right if your discord bot is in a large amount of servers(>=1000). In that case you should be getting glit

Going static isn't so bad

In fact some people called it a stack called JAMStack. Here are ways you can make static apps that are still as cool as server side apps.

How do I make stuff only show when someone enters a password

  1. Encrypt something with your password as the key
  2. Put it on the webpage. When someone enters the password attempt to decrypt using the same key(please use non-bruteforcable encryption so don't use the Vigenere cipher for this). If it's successful show the decrypted content.

Suppose someone is answering a math problem how do I make it so they can't just hack and find the answer without checking the answer on the server side

Hash the answer and when the user presses a button to check their answers just hash their input and compare. In addition, use a similiar method like the blockchain and add a really long salt to make computation slower so it isn't bruteforcable.

How do I make it so people can load data and save data from other people

  • You c
@khalby786
khalby786 / server.js
Created August 26, 2020 11:27
GitHub oAuth Login with Express & without Passport.js
const express = require("express");
const app = express();
var session = require('express-session');
const fetch = require('node-fetch');
const clientID = process.env.CLIENT_ID;
const clientSecret = process.env.CLIENT_SECRET;
async function getAccessToken(code, client_id, client_secret) {
const request = await fetch("https://github.com/login/oauth/access_token", {
@jaames
jaames / fancy-css-links.md
Last active April 13, 2022 09:20
Fancy CSS link underlines with inline SVGs (plus embedded animations!)
@nvbn
nvbn / app.py
Last active March 11, 2023 13:16
Sound lights with spotify, esp8266 and neopixel strip
from __future__ import annotations
import array
import asyncio
from bisect import bisect_left
from dataclasses import dataclass
import logging
import os
import socket
import time
@oliveratgithub
oliveratgithub / emojis.json
Last active July 21, 2024 14:56
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
{
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "👩‍👩‍👧‍👧", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "👩‍👩‍👧‍👦", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "👩‍👩‍👦‍👦", "category": "People & Body (family)", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "👨‍👩&z
@9b
9b / what_runs.py
Created August 26, 2017 03:51
Simple tool to use WhatRuns API to get technologies used on a page. Doesn't submit the page if it's not in the database.
import ast
import datetime
import json
import sys
import requests
import urllib
from tabulate import tabulate
url = "https://www.whatruns.com/api/v1/get_site_apps"
data = {"data": {"hostname": sys.argv[1], "url": sys.argv[1],