Skip to content

Instantly share code, notes, and snippets.

View azlkiniue's full-sized avatar
:shipit:
Forever a work in progress

Ahmada Yusril azlkiniue

:shipit:
Forever a work in progress
View GitHub Profile
@naufalso
naufalso / pdf-color-pages-classifier-and-counter.ipynb
Last active January 3, 2024 06:27
pdf-color-pages-classifier-and-counter.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Usage: python3 tldr_fail_test.py ${HOSTNAME}
#
# You can optionally pass the destination IP with --addr
#
# Author: davidben [at] chromium [dot] org
import argparse
import socket
import time
@py7hon
py7hon / README.md
Last active July 25, 2022 07:35
Simple Python script for make watermark like windows activate

Watermark

Dependences:

  • python-gobject

Usage:

chmod +x watermark ./watermark

Screenshots:

@sindresorhus
sindresorhus / esm-package.md
Last active April 25, 2024 08:14
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@datio
datio / commands.sh
Last active September 22, 2021 09:16
Hide Svelte or Sapper usage from Wappalyzer et al.
// make sure you have changed your working directory to your project
cd app
// svelte
// see https://github.com/sveltejs/svelte/issues/2900#issuecomment-701644971
npm install svelte
sed -i 's/svelte-\$/_$/g' ./node_modules/svelte/compiler.js
// sapper
npm install sapper
@dominikwilkowski
dominikwilkowski / README.md
Created September 5, 2020 02:57
ANSI codes for cli controled output

ANSI escape codes

ANSI escape codes can be printed to a shell to as instructions. The below is a list of codes I have used often in my CLI programs and I find myself looking up over and over again.

A great article about it can be found here.

Content

@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active April 19, 2024 06:56
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

With 2^0 = 1 bit signed integers, Unix time will overflow on: 00:00:01 UTC January 01, 1970
With 2^0 = 1 bit unsigned integers, Unix time will overflow on: 00:00:02 UTC January 01, 1970
With 2^1 = 2 bit signed integers, Unix time will overflow on: 00:00:02 UTC January 01, 1970
With 2^1 = 2 bit unsigned integers, Unix time will overflow on: 00:00:04 UTC January 01, 1970
With 2^2 = 4 bit signed integers, Unix time will overflow on: 00:00:08 UTC January 01, 1970
With 2^2 = 4 bit unsigned integers, Unix time will overflow on: 00:00:16 UTC January 01, 1970
With 2^3 = 8 bit signed integers, Unix time will overflow on: 00:02:08 UTC January 01, 1970
@rezkyfm
rezkyfm / github-followback-checker.py
Last active February 18, 2023 15:20
Check if user in github follow you back or not
'''
Check if user in github follow you back or not
'''
import requests
username = input("Enter your username: ")
def main(username):
@allenday
allenday / gini-balance-bitcoin.sql
Created January 31, 2019 10:31
Calculate Gini coefficient for Bitcoin balances.
WITH double_entry_book AS (
-- debits
SELECT
array_to_string(inputs.addresses, ",") as address
, inputs.type
, -inputs.value as value
, block_timestamp
FROM `bigquery-public-data.crypto_bitcoin.inputs` as inputs
UNION ALL