Skip to content

Instantly share code, notes, and snippets.

View mrofi's full-sized avatar
🏠
work from home

Mokhamad Rofiudin mrofi

🏠
work from home
View GitHub Profile
<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
body {
background: repeat url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/7QCIUGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAGscAVoAAxslRxwCAAACAAAcAnQAV8KpIENoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbGQgLSBodHRwOi8vd3d3LnJlZGJ1YmJsZS5jb20vcGVvcGxlL0NoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbAD/4gxYSUNDX1BST0ZJTEUAAQEAAAxITGlubwIQAABtbnRyUkdCIFhZWiAHzgACAAkABgAxAABhY3NwTVNGVAAAAABJRUMgc1JHQgAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLUhQICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABFjcHJ0AAABUAAAADNkZXNjAAABhAAAAGx3dHB0AAAB8AAAABRia3B0AAACBAAAABRyWFlaAAACGAAAABRnWFlaAAACLAAAABRiWFlaAAACQAAAABRkbW5kAAACVAAAAHBkbWRkAAACxAAAAIh2dWVkAAADTAAAAIZ2aWV3AAAD1AAAACRsdW1pAAAD+AAAABRtZWFzAAAEDAAAACR0ZWNoAAAEMAAAAAxyVFJDAAAEPAAACAxnVFJDAAAEPAAACAxiVFJDAAAEPAAACAx0ZXh0AAAAAENvcHlyaWdodCAoYykgMTk5OCBIZXdsZXR0LVBhY2thcmQgQ29tcGFueQAAZGVzYwAAAAAAAAASc1JHQiBJRUM2MTk2Ni0yLjEAAAAAAAAAAAAAABJzUkdCIElFQzYxOTY2LTIuMQAAAAAAAA
@mrofi
mrofi / mysql_backup.config
Last active February 20, 2023 13:41 — forked from tleish/mysql_backup.sh
Bash Script to backup all MySQL databases
[client]
user = "mysql_user"
password = "mysql_password"
host = "localhost"
@mrofi
mrofi / phantomjs
Created February 15, 2017 19:07 — forked from deviantony/phantomjs
Installer script to setup phantomjs 1.9.7, it will remove any previous setup. Contains also the init script to manage phantomjs as a system service and the default configuration file. Tested on Ubuntu 12.04.
#! /bin/sh
# Init. script for phantomjs, based on Ubuntu 12.04 skeleton.
# Author: Anthony Lapenna <[email protected]>
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Phantomjs service"
NAME=phantomjs
DAEMON=/usr/bin/$NAME
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
@mrofi
mrofi / composerstyle.txt
Last active September 21, 2017 03:37 — forked from michaellouieloria/gist:f2ee272d1709a0e80f71
Phantomjs in Facebook PHP webdriver
require_once __DIR__ . "/vendor/autoload.php";
use \Facebook\WebDriver\Remote\WebDriverCapabilityType;
use \Facebook\WebDriver\Remote\RemoteWebDriver;
use \Facebook\WebDriver\WebDriverDimension;
$host = '127.0.0.1:8910';
$capabilities = array(
WebDriverCapabilityType::BROWSER_NAME => 'phantomjs',
'phantomjs.page.settings.userAgent' => 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0',
@mrofi
mrofi / setup_selenium.sh
Created January 10, 2017 07:55 — forked from curtismcmullan/setup_selenium.sh
Setup Selenium Server on Ubuntu 14.04
#!/bin/bash
# Following the guide found at this page
# http://programmingarehard.com/2014/03/17/behat-and-selenium-in-vagrant.html
echo "\r\nUpdating system ...\r\n"
sudo apt-get update
# Create folder to place selenium in
@mrofi
mrofi / capistrano_windows.textile
Created August 24, 2016 08:10
Cygwin + Ruby + RubyGems => Deploy with Capistrano from Windows
@mrofi
mrofi / visor-archivos-online.md
Created August 13, 2016 16:09 — forked from izazueta/visor-archivos-online.md
Google Docs Viewer & Office Web Apps Viewer

Google Docs Viewer

Only files under 25 MB can be previewed with the Google Drive viewer.

Google Drive viewer helps you preview over 16 different file types, listed below:

  • Image files (.JPEG, .PNG, .GIF, .TIFF, .BMP)
  • Video files (WebM, .MPEG4, .3GPP, .MOV, .AVI, .MPEGPS, .WMV, .FLV)
  • Text files (.TXT)
  • Markup/Code (.CSS, .HTML, .PHP, .C, .CPP, .H, .HPP, .JS)
  • Microsoft Word (.DOC and .DOCX)
@mrofi
mrofi / nginx-project.conf
Created November 30, 2015 10:26 — forked from wicochandra/nginx-project.conf
My default server configuration for development.
server {
listen 80;
listen 8888;
server_name localhost;
index index.php index.html index.htm;
root /path/to/root;
autoindex on;
@mrofi
mrofi / README.md
Last active September 7, 2015 00:23 — forked from mul14/README.md
Simple Laravel Search Trait

Usage

Put SearchTrait.php in app directory. Then use SearchTrait in your model, like so

use App\SearchTrait;
use Illuminate\Database\Eloquent\Model;

class Article extends Model {
@mrofi
mrofi / validation.php
Last active November 21, 2022 08:02 — forked from RoesWibowo/validation.php
Laravel 4 Validation Message Bahasa Indonesia
<?php
return array(
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by