Skip to content

Instantly share code, notes, and snippets.

View nake89's full-sized avatar
😊
Have a great day!

Kevin Kivi nake89

😊
Have a great day!
View GitHub Profile
@nake89
nake89 / tldsquattingsortable.user.js
Created January 30, 2024 12:42
TLD Squatting - Sortable Table
// ==UserScript==
// @name TLD Squatting - Sortable Table
// @namespace http://tampermonkey.net/
// @version 2024-01-30
// @description Ability to sort the table.
// @author nake89
// @match https://captnemo.in/tld-squatting/
// @icon https://www.google.com/s2/favicons?sz=64&domain=captnemo.in
// @grant none
// ==/UserScript==
@nake89
nake89 / check_vat.php
Created January 16, 2023 19:16 — forked from wqweto/check_vat.php
Check company VAT number using SOAP service at http://ec.europa.eu and return JSON encoded result
<?php
header('Content-type: application/json; charset=utf8');
$vatno = str_replace(array(' ', '.', '-', ',', '"'), '', $_GET['vatno']);
echo serviceCheckVat($vatno, &$name, &$address, &$error);
/*
include "connect.php";
mysql_query("SET NAMES utf8");
$vatno = mysql_real_escape_string($_GET['vatno']);
@nake89
nake89 / serverless.yaml
Created August 7, 2021 07:16
Neat way to get aws api gateway lambda url and put it in serverless.yaml to store it as an environment variable on the lambda function
# Neat way to get aws api gateway lambda url and put it in serverless.yaml to store it as an environment variable on the lambda function:
provider:
name: aws
runtime: nodejs12.x
stage: ${env:STAGE}
region: ${env:REGION}
environment:
CI_URL:
{
"Fn::Join":
const {
DynamoDBClient,
ListTablesCommand,
} = require("@aws-sdk/client-dynamodb")
;(async () => {
const config = {
region: process.env.REGION,
credentials: {
accessKeyId: process.env.AWS_KEY,
secretAccessKey: process.env.AWS_SECRET,
@nake89
nake89 / ec2-vim-machine.sh
Created June 22, 2020 18:43
ec2-vim-machine.sh
#!/bin/bash
curl -LO https://github.com/neovim/neovim/releases/download/stable/nvim.appimage
chmod +x nvim.appimage
mv ./nvim.appimage /usr/bin/nvim
yum install -y fuse fuse-libs git
curl -sL install-node.now.sh/lts | bash -s -- -y
# Gotta do symbolic links so we can run sudo npm later
ln -s /usr/local/bin/node /usr/bin/node
ln -s /usr/local/bin/npm /usr/bin/npm
sudo -u ec2-user -- sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Hello</title>
</head>
let body = req.body
let url = req.url
let original_url = req.originalUrl
let method = req.method
@nake89
nake89 / i3-gaps.sh
Created March 23, 2019 08:59 — forked from dabroder/i3-gaps.sh
Install i3-gaps on ubuntu 18.04
#!/bin/bash
sudo apt install -y libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf libxcb-xrm0 libxcb-xrm-dev automake i3status suckless-tools
cd /tmp
# clone the repository
git clone https://www.github.com/Airblader/i3 i3-gaps
cd i3-gaps
# compile & install
{"creation_date": { $exists: true }}
class Canvas {
constructor(x, y) {
this.x = x
this.y = y
this.canvas = document.createElement("canvas")
this.ctx = this.canvas.getContext("2d")
document.body.appendChild(this.canvas)
this.ctx.fillStyle = "rgb(51, 51, 51)"
this.ctx.fillRect(0, 0, x, y)