Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Henter henter

🏠
Working from home
  • G
  • LA
View GitHub Profile
@henter
henter / getPubKey.js
Created May 3, 2022 — forked from chrsengel/getPubKey.js
Attempting to get the public key
View getPubKey.js
const ethers = require("ethers")
const pk =
"0x0471c746523d16e93d4738f882d9b0beebf66c68caa0f895db15686b57b878cfc7b3e09813ba94f1bbfaa91a06566d3d18bbf69d10bcc947325bbcd6fea97ed692"
const ad = "0xcD3edF915387E2555A829567cE0dBbC919834B82"
getPubKey = async () => {
const infuraProvider = new ethers.providers.JsonRpcProvider(
"https://ropsten.infura.io/v3/<projectID>"
)
@henter
henter / idea
Created Nov 29, 2018 — forked from chrisdarroch/idea
Open a project in IntelliJ IDEA from your command line!
View idea
#!/usr/bin/env bash
IDEA=''
PROJECT_DIR=''
function main() {
openIdea "$@"
}
function openIdea() {
@henter
henter / clean-docker-for-mac.sh
Created Mar 16, 2018 — forked from MrTrustor/clean-docker-for-mac.sh
This script cleans the Docker.qcow2 file that takes a lot of disk space with Docker For Mac. You can specify some Docker images that you would like to keep.
View clean-docker-for-mac.sh
#!/bin/bash
# Copyright 2017 Théo Chamley
# 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 furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or
View keybase.md

Keybase proof

I hereby claim:

  • I am henter on github.
  • I am henter (https://keybase.io/henter) on keybase.
  • I have a public key whose fingerprint is 2797 EEA8 E75C 7844 767B 8B18 8EB4 12B0 CB9D F566

To claim this, I am signing this object:

View md5.c
/*
* Simple MD5 implementation
*
* Compile with: gcc -o md5 md5.c
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
View get_docker.sh
#!/bin/sh
set -e
#
# This script is meant for quick & easy install via:
# 'curl -sSL https://get.docker.com/ | sh'
# or:
# 'wget -qO- https://get.docker.com/ | sh'
#
# For test builds (ie. release candidates):
# 'curl -sSL https://test.docker.com/ | sh'
@henter
henter / ubuntu_php_oci8
Created Jul 6, 2015
ubuntu install php oci8
View ubuntu_php_oci8
#/etc/profile
ORACLE_HOME=/usr/lib/oracle/12.1/client64
TNS_ADMIN=/usr/lib/oracle/12.1/client64
LD_LIBRARY_PATH=$ORACLE_HOME/lib
#NLS_LANG=american_america.utf8
NLS_LANG=ZHS16GBK
export ORACLE_HOME LD_LIBRARY_PATH NLS_LANG
export C_INCLUDE_PATH=/usr/include/oracle/12.1/client
View nginx_demo.conf
server {
listen 80;
server_name xxx.com;
root /var/www/xxx/;
error_log /var/log/nginx/xxx.error.log;
access_log /var/log/nginx/xxx.access.log;
location / {
index index.php;
try_files $uri $uri/ @rewriteapp;
@henter
henter / nginx_log.sh
Created Sep 17, 2014
backup nginx logs
View nginx_log.sh
#!/bin/bash
log_dir=/var/log/nginx/
backup_log_dir=/home/backup/nginx_logs/$(date +"%Y%m")/
log_date=$(date +"%Y%m%d")
nginx_pid=/var/run/nginx.pid
keep_days=30
echo "processing ${log_dir}"
#create backup dir
View ocp.php
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.6
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
0.1.5 2013-04-12 added graphs to visualize cache state, please report any browser/style bugs