Skip to content

Instantly share code, notes, and snippets.

View pmoust's full-sized avatar

Panagiotis Moustafellos pmoust

View GitHub Profile
@pmoust
pmoust / payoneer.php
Created February 27, 2015 08:42
payoneer.php
<?php
/**
* Payoneer API integration
*
* @date 27/11/12
* @name $payoneer
* @author Panagiotis Moustafellos
*/
class Payoneer
{
@pmoust
pmoust / dns.sh
Last active January 31, 2021 15:02
DNS w/ reasonable privacy & ad-blocking
# DNS w/ (not so) reasonable privacy & ad-blocking
# Local-caching DNS via dockerd on xhyve/LinuxKit, for the default wifi interface on MacOSX, using
# Pi-hole 5.6 https://pi-hole.net/ and pointing to the DNS service offered by LibreOps RadicalDNS https://libreops.cc/radicaldns.html
# Admin-interface at http://127.0.0.1:8082/admin/
#
# Use https://libredns.gr/ for DoH/DoT to achieve reasonable privacy over the wire
docker run -d --name pihole \
-e ServerIP=127.0.0.1 \
-e WEBPASSWORD="mypihole" \
-e DNS1=88.198.92.222 \
@pmoust
pmoust / root.sh
Last active March 20, 2018 08:50
dockah
docker run -it --rm --security-opt=seccomp:unconfined \
--security-opt=apparmor:unconfined \
--privileged --pid=host --userns=host \
debian:jessie@sha256:51cd80bb935b76fbbf49640750736abc63ab7084d5331e198326b20063e7f13c \
nsenter -t 1 -m -u -n -i -F /bin/sh
@pmoust
pmoust / php-upgrade-5.5.x.sh
Last active January 26, 2018 14:13
Centos 6.4 painless upgrade from #php 5.3.3 to 5.5.x by
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
yum install yum-plugin-replace -y
yum replace php-common --replace-with=php55w-common
@pmoust
pmoust / install_htop_darwin.sh
Last active May 16, 2017 09:03
Install htop in Darwin
HTOP_VERSION="2.0.0"
brew remove htop 2>/dev/null
rm -rf `which htop` 2>/dev/null
cd /tmp
wget http://hisham.hm/htop/releases/${HTOP_VERSION}/htop-${HTOP_VERSION}.tar.gz
tar zxvf htop-${HTOP_VERSION}.tar.gz
cd htop-${HTOP_VERSION}
./configure && make && make install && rm -rf /tmp/htop-${HTOP_VERSION}*
popd

Keybase proof

I hereby claim:

  • I am pmoust on github.
  • I am pmoust (https://keybase.io/pmoust) on keybase.
  • I have a public key ASDQgNASpHW0HAnGumPc9_Rk9M5UGOmICSCEe1WrMwtNCwo

To claim this, I am signing this object:

@pmoust
pmoust / httpget
Last active December 27, 2015 09:29 — forked from DaSourcerer/httpget
#!/usr/bin/php
<?php
$scheme='tcp';
$host='www.kernel.org';
$port=80;
$path='/';
if(isset($argv[1])) {
$parsedUrl=parse_url($argv[1]);
<?php
/**
* Returns the active language.
* @return string the locale.
*/
public function resolveActiveLanguage()
{
$user = user();
$matches = array();
if ($user->hasState('__locale')) {
" Modeline and notes {
" vim: set foldmarker={,} foldlevel=0 foldmethod=marker spell:
" }
" Setup Environment {
" The following two lines are required by Vundle.
set nocompatible " be iMproved
filetype off " required!
" Windows Compatibility
@pmoust
pmoust / circle.yml
Created October 15, 2015 19:42
terraform sync test
---
machine:
environment:
TF_VERSION: 0.6.4
INFRASTRUCTURE: "peopleperhour supertasker mailchap"
AWS_DEFAULT_REGION: us-east-1
AWS_ACCESS_KEY_ID: readonly
AWS_SECRET_ACCESS_KEY: readonly
FOO: LOL