Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Typing...

Herpiko Dwi Aguno herpiko

:octocat:
Typing...
View GitHub Profile
View a2dissite
#!/usr/bin/env python
import sys
import os
arg = sys.argv
arlen = len(arg)
available = '/etc/httpd/sites-available'
enabled = '/etc/httpd/sites-enabled'
View Dockerfile.nodejs
FROM tatsushid/tinycore-node
# set environment
ENV APP=/opt/maoo
# Create app directory
RUN mkdir -p $APP
WORKDIR $APP
# Install app dependencies
COPY package.json $APP
@herpiko
herpiko / latest-firefox.sh
Created Jun 5, 2017 — forked from ruario/latest-firefox.sh
This script will find the latest Firefox binary package, download it and repackage it into Slackware format.
View latest-firefox.sh
#!/bin/bash
# latest-firefox Version 1.3.9
# This script will find the latest Firefox binary package, download it
# and repackage it into Slackware format.
# I don't use Firefox for regular browsing but it is handy for
# comparative tests against Vivaldi. :P
# Copyright 2016 Ruari Oedegaard, Oslo, Norway
View Open Redis to accept external connections
# Manually secure port 6379
sudo iptables -A INPUT -p tcp --dport 6379 -s xxx.xxx.xxx.xxx -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 6379 -j DROP
sudo iptables -L
# Save current firewall config
sudo iptables-save > /etc/iptables.conf
# Load iptables.conf on startup
sudo nano /etc/rc.local
@herpiko
herpiko / linux_x380.md
Created Dec 28, 2019 — forked from wassname/linux_x380.md
xubuntu on a Thinkpad Yoga x380
View linux_x380.md

This are a collection of fixes and tweaks I used to get Xubuntu 18.04 LTS working on a lenovo thinkpad X380 yoga laptop.

View Token.sol
pragma solidity ^0.8.2;
contract Token {
mapping(address => uint) public balances;
mapping(address => mapping(address => uint)) public allowance;
uint public totalSupply = 1000000 * 10 ** 18;
string public name = "INDOG"; // name your token
string public symbol = "INDG"; // code your token
uint public decimals = 18;