Skip to content

Instantly share code, notes, and snippets.

View harimau99's full-sized avatar
:octocat:
Mercenary on Cloud & Security that do code at anywhere available for hire

Najoe harimau99

:octocat:
Mercenary on Cloud & Security that do code at anywhere available for hire
View GitHub Profile
@harimau99
harimau99 / divi-mobile-submenu-toggles.css
Created October 23, 2018 14:16 — forked from Garconis/divi-mobile-submenu-toggles.css
Divi | WordPress Theme | Mobile Menu Collapsible Submenus via Toggles | CSS & jQuery Tweaks in action: https://i.gyazo.com/93557e9ef5d4aad260e22c6d5896de3b.mp4
/* when mobile menu is open, change hamburger icon to x icon */
#et_mobile_nav_menu .mobile_nav.opened .mobile_menu_bar::before {
content: '\4d';
}
/* makes sub sub menu icon be right arrow instead of down arrow */
#top-menu .menu-item-has-children .menu-item-has-children > a:first-child::after,
#et-secondary-nav .menu-item-has-children .menu-item-has-children > a:first-child::after {
content: '5';
}
try {
(function(win, d, location, history) {
/**
* @param {Object} params
* @return {undefined}
*/
function Document(params) {
var e;
for (e in params) {
if (jQuery.call(params, e)) {
@harimau99
harimau99 / a.md
Created August 3, 2018 18:47 — forked from danharper/a.md
Laravel Queue Supervisor

Install Supervisor with sudo apt-get install supervisor. Ensure it's started with sudo service supervisor restart.

In /etc/supervisord/conf.d/ create a .conf file. In this example, laravel_queue.conf (contents below). Give it execute permissions: chmod +x laravel_queue.conf.

This file points at /usr/local/bin/run_queue.sh, so create that file there. Give this execute permissions, too: chmod +x run_queue.sh.

Now update Supervisor with: sudo supervisorctl reread. And start using those changes with: sudo supervisorctl update.

@harimau99
harimau99 / .travis.yml
Created July 24, 2018 13:27 — forked from shubham9411/.travis.yml
Travis CI config for WordPress
# Travis CI (MIT License) configuration file for the solitude WordPress theme.
# @link https://travis-ci.org/
# For use with the solitude WordPress theme.
# @link https://github.com/shubham9411/solitude
# Ditch sudo and use containers.
# @link http://docs.travis-ci.com/user/migrating-from-legacy/#Why-migrate-to-container-based-infrastructure%3F
# @link http://docs.travis-ci.com/user/workers/container-based-infrastructure/#Routing-your-build-to-container-based-infrastructure
sudo: false
@harimau99
harimau99 / wp.sh
Created June 26, 2018 16:59 — forked from bgallagh3r/wp.sh
Wordpress: Bash Install Script -- Downloads latest WP version, updates wp-config with user supplied DB name, username and password, creates and CHMOD's uploads dir, copies all the files into the root dir you run the script from, then deletes itself!
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Database Name: "
read -e dbname
echo "Database User: "
read -e dbuser
echo "Database Password: "
@harimau99
harimau99 / deployment-tool-ansible-puppet-chef-salt.md
Created June 25, 2018 17:31 — forked from jaceklaskowski/deployment-tool-ansible-puppet-chef-salt.md
Choosing a deployment tool - ansible vs puppet vs chef vs salt

Requirements

  • no upfront installation/agents on remote/slave machines - ssh should be enough
  • application components should use third-party software, e.g. HDFS, Spark's cluster, deployed separately
  • configuration templating
  • environment requires/asserts, i.e. we need a JVM in a given version before doing deployment
  • deployment process run from Jenkins

Solution

@harimau99
harimau99 / 1.js
Created May 6, 2018 11:54 — forked from Shelob9/1.js
(function(angular) {
'use strict';
angular.module('learnAngular', [])
.controller('postExample', ['$scope', function($scope) {
$scope.post = {
title: 'Enter Title'
};
}]);
})(window.angular);
@harimau99
harimau99 / bss_to_wordpress.php
Created April 22, 2018 04:25 — forked from bkonia/bss_to_wordpress.php
BSS to WordPress - Automatically Publishes Bootstrap Studio Exports to WordPress
#!/usr/local/bin/php
<?php
/* This script automatically publishes BSS exports to WordPress.
* Install Composer from https://getcomposer.org/ . Composer needs to be installed on your local computer where BSS is installed, NOT on the server.
* Use Composer to install QueryPath (also on your local computer), following the instructions at https://github.com/technosophos/querypath
* On the server, install the JSON Basic Authentication WordPress plugin from https://github.com/WP-API/Basic-Auth
* Create an ini file in the bss_exports parent directory, containing values for base_url, wp_username, wp_password.
* BSS automatically creates an assets folder in the export directory. This folder contains subfolders for css, images, js, etc... To automatically upload assets, provide ini values for ssh_username, ssh_host, ssh_path (file system path to your public web directory with no trailing slash)
* In BSS, create a meta tag for each page you want to publish.
pragma solidity ^0.4.8;
// ECR20 standard token interface
contract Token {
uint public totalSupply;
function balanceOf(address who) constant returns (uint);
function allowance(address owner, address spender) constant returns (uint);
function transfer(address to, uint value) returns (bool ok);
function transferFrom(address from, address to, uint value) returns (bool ok);
@harimau99
harimau99 / BasiCoin.sol
Created February 28, 2018 12:11 — forked from 5chdn/BasiCoin.sol
Deploy BasiCoin via Parity IDE
//! The basic-coin ECR20-compliant token contract.
//!
//! Copyright 2016 Gavin Wood, Parity Technologies Ltd.
//!
//! Licensed under the Apache License, Version 2.0 (the "License");
//! you may not use this file except in compliance with the License.
//! You may obtain a copy of the License at
//!
//! http://www.apache.org/licenses/LICENSE-2.0
//!