Skip to content

Instantly share code, notes, and snippets.

💭
on fire! 🔥

Roni Laukkarinen ronilaukkarinen

Block or report user

Report or block ronilaukkarinen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ronilaukkarinen
ronilaukkarinen / bitbucket2github.sh
Last active Jan 30, 2019
Easily move all repositories from Bitbucket to GitHub (fill in things in CAPS that are not variables)
View bitbucket2github.sh
#!/bin/bash
# Migrate from Bitbucket to GitHub easily
# Helpers:
currentfile=`basename $0`
txtbold=$(tput bold)
boldyellow=${txtbold}$(tput setaf 3)
boldgreen=${txtbold}$(tput setaf 2)
boldwhite=${txtbold}$(tput setaf 7)
yellow=$(tput setaf 3)
@ronilaukkarinen
ronilaukkarinen / icon.svg
Created Oct 17, 2018
WP Fastest Cache - better icon
View icon.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ronilaukkarinen
ronilaukkarinen / toolbar.css
Created Oct 17, 2018
WP Fastest Cache - better icon
View toolbar.css
#revert-loader-toolbar{
display: none;
background: rgba(255, 255, 255, .7) url('data:image/gif;base64,R0lGODlhSwBLANUAAP////7+/v39/fz8/Pr6+vn5+ff39/b29vX19fT09PPz8/Ly8vHx8fDw8O/v7+7u7u3t7ezs7Ovr6+rq6unp6ejo6Ofn5+bm5uTk5OPj4+Li4uDg4N3d3dra2tjY2NfX19TU1NHR0c/Pz87Ozs3NzcfHx8XFxcTExMHBwbu7u7q6urW1tbS0tLGxsa+vr6ioqKenp6Kiop6enp2dnZycnJSUlJOTk4qKioCAgHd3d21tbWNjYwAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFCgAAACwAAAAAQwBLAAAG/0CAcEgsGo/FAogVo8VYoAJySq1aj50mbcuNda7g8LXELZdL4rRaCDK7t6C13KrQvssxxXx/JN/daHyCQi9/bi+Dg4ZviVQFCpADSBaLbhZICB6aEnIUICOgoBx6SZVmUkUeNjusrDkqYgcfobSgG0Z2lTFGMq2+rDgaVwchtca3RCimWyhFvb+/OsJVs8bGl0OUy9hCLdDfOFUW1uSoQimmKUQS3+0tVJ/kxhNEBS6LLuYAKe3fOVMF5Fn7Ug/dnRT6ANzo943TEQUCjYU4YsEglxTciOhgCM0DEogRawG0QDIhEY4dP4akFWdPDpS+PB4ZsDIUBz41YLY6MIVDzf8REPiY0LmjBhWQIVvyeQlT5pQNK0nx8QBTxhWoAoMmGsrQKhgLxYyB4NkIgAam0d6JGTChw6cPGxqULSJCBo4dOW6kIDu3r9+/fPgCTjQgQ7wRITZIHSwHQthjkhirwSrvQ2TJYCCsvIn5yoDHEeV2rjLhJ8HRUzr8HHEZtZHVIxa7JgJb9mwhtW8bUf2ztW4ApWue/i3kc03RxIdoDsk5ORHK5Cw7N+KY3Abf04tjOJzYdnYjgr+LH/
@ronilaukkarinen
ronilaukkarinen / wpFastestCache.php
Created Oct 17, 2018
WP Fastest Cache - better icon
View wpFastestCache.php
<?php
public function register_my_custom_menu_page(){
if(function_exists('add_menu_page')){
$page_title = 'WP Fastest Cache Settings';
$menu_title = 'WP Fastest Cache';
$capability = 'manage_options';
$menu_slug = 'wpfastestcacheoptions';
$function = array($this, 'optionsPage');
$icon_svg = 'data:image/svg+xml;base64,' . base64_encode( '<svg xmlns="http://www.w3.org/2000/svg" fill="#9ea4aa" width="20" height="20" viewBox="0 0 24 24"><path d="M8.35 3c1.18-.17 2.43 1.12 2.79 2.9.36 1.77-.29 3.35-1.47 3.53-1.17.18-2.43-1.11-2.8-2.89-.37-1.77.3-3.35 1.48-3.54m7.15 0c1.19.19 1.85 1.77 1.5 3.54-.38 1.78-1.63 3.07-2.81 2.89-1.19-.18-1.84-1.76-1.47-3.53.36-1.78 1.61-3.07 2.78-2.9M3 7.6c1.14-.49 2.69.4 3.5 1.95.76 1.58.5 3.24-.63 3.73-1.13.49-2.67-.39-3.46-1.96C1.62 9.75 1.9 8.08 3 7.6m18 0c1.1.48 1.38 2.15.59 3.72-.79 1.57-2.33 2.45-3.46 1.96-1.13-.49-1.39-2.15-.63-3.73C18.31 8 19.86 7.11 21 7.6m-1.67 10.78c.04.94-.68 1.98-1.54 2.37-1.79.82-3.91-.88-5.9-.88-1
View page-diary.php
<?php
/**
* Template Name: Diary
*
*/
get_header();
// WP_Query arguments
// More arguments: https://codex.wordpress.org/Class_Reference/WP_Query
View php7.conf
location /xmlrpc.php {
deny all;
}
location ~* /xmlrpc.php {
deny all;
access_log off;
log_not_found off;
}
View wordpress.conf
# WordPress single site rules.
# Designed to be included in any server {} block.
# This order might seem weird - this is attempted to match last if rules below fail.
# http://wiki.nginx.org/HttpCoreModule
location / {
try_files $uri $uri/ /index.php?$args;
}
# Add trailing slash to */wp-admin requests.
View example.com.conf
server {
listen 443 ssl http2;
root /var/www/example.com/public_html;
index index.html index.htm index.php;
include php7.conf
include global/wordpress.conf;
server_name example.com www.example.com;
View trakt.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ronilaukkarinen
ronilaukkarinen / hhvm.conf
Created May 4, 2016 — forked from tomazzaman/hhvm.conf
Monit configurations for commonly used services
View hhvm.conf
check process hhvm with pidfile /var/run/hhvm/pid
group hhvm
start program = "/usr/sbin/service hhvm start" with timeout 60 seconds
stop program = "/usr/sbin/service hhvm stop"
if failed unixsocket /var/run/hhvm/hhvm.sock then restart
if mem > 400.0 MB for 1 cycles then restart
if 5 restarts with 5 cycles then timeout
You can’t perform that action at this time.