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 / 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 \
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 / 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":
@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 / 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==