Skip to content

Instantly share code, notes, and snippets.

View iap's full-sized avatar
🎯
Focusing

Iko iap

🎯
Focusing
  • ID
  • 06:19 (UTC +07:00)
View GitHub Profile
@iap
iap / rules-both.iptables
Created May 24, 2021 20:08 — forked from jirutka/rules-both.iptables
Basic iptables template for ordinary servers (both IPv4 and IPv6)
###############################################################################
# The MIT License
#
# Copyright 2012-2014 Jakub Jirutka <jakub@jirutka.cz>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@iap
iap / he-ipv6.sh
Created May 17, 2021 08:59 — forked from jbhannah/he-ipv6.sh
Hurricane Electric IPv6 Tunnel Broker script for Ubuntu
#!/bin/sh
# Hurricane Electric IPv6 Tunnel Broker script for Ubuntu
# /etc/network/if-up.d/he-ipv6.sh
# Written by Jesse B. Hannah (http://jbhannah.net) <jesse@jbhannah.net>
# Based on instructions provided by Hurricane Electric (http://tunnelbroker.net)
###
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@iap
iap / Win10-64bit-npm.md
Created May 10, 2021 15:51 — forked from jtrefry/Win10-64bit-npm.md
Configuring Windows 10 (64-bit) for npm and node-gyp
  • Install Git for Windows
  • Install Node
  • Install Python 2.7.3
  • Install Microsoft Visual Studio 2015 Community
  • Open the command prompt as Administrator, run the following commands, then close the command prompt (a new prompt is required before the new environment variables will be available)
    • npm install -g npm
      • (Upgrades to npm v3, which no longer nests dependencies indefinitely. No more "maximum path length exceeded" errors due to the 260 character path limit in Windows, or needing to delete node_modules with rimraf.)
    • setx PYTHON C:\Python27\python.exe /m
      • (May need to change path to your custom install directory.)
  • Open a new command prompt and run the following commands. If these install without errors, you have bypasse
@iap
iap / Schema.js
Created May 1, 2021 18:54 — forked from paulgrieselhuber/Schema.js
Adding Schema Data to Next.js Sites
import Head from "next/head";
import { site, siteTitle } from "../../config";
function strip(html) {
var one = html.replace(/<\/?[^>]+(>|$)/gm, "");
var two = one.replace(/[\r\n]\s*[\r\n]/gm, "");
return two;
}
const Schema = ({ post }) => {
@iap
iap / Makefile
Created January 26, 2019 16:08 — forked from mpneuried/Makefile
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@iap
iap / npm-registry-licenses.txt
Created September 23, 2018 11:45 — forked from robertkowalski/npm-registry-licenses.txt
The licenses in the npm-registry from their package.json, from the latest version of each module 23.11.2013
The licenses in the npm-registry from their package.json, from the latest version of each module
23.11.2013
[ { key: 'undefined', value: 27785 },
{ key: 'MIT', value: 20811 },
{ key: 'BSD', value: 5240 },
{ key: 'BSD-2-Clause', value: 621 },
{ key: 'Apache 2.0', value: 263 },
{ key: 'GPL', value: 233 },
@iap
iap / heroku-remote.sh
Created July 1, 2018 06:42 — forked from randallreedjr/heroku-remote.md
Add a Heroku remote to an existing git repo
$ git remote add staging https://git.heroku.com/staging-app.git
$ git remote add heroku https://git.heroku.com/app.git
@iap
iap / LEPP.md
Created June 26, 2018 21:54 — forked from cham11ng/LEPP.md
LEPP Setup - Ubuntu 16.04 LTS

A Relatively Secure Server Stack Setup in Ubuntu 16.04 LTS

Anup Dhakal

Sagar Chamling

Introduction

In this guide, LEPP stands for Linux, Nginx (pronounced as Engine-X) , Postgres and PHP (PHP Hypertext Preprocessor).