Skip to content

Instantly share code, notes, and snippets.

View qutek's full-sized avatar
💻
Working from home

Lafif Astahdziq qutek

💻
Working from home
View GitHub Profile
/* Flatten das boostrap */
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
border-radius: 0px !important;
border-collapse: collapse !important;
background-image: none !important;
@qutek
qutek / email-confirmation.php
Created August 8, 2014 17:46 — forked from elclanrs/email-confirmation.php
[Wordpress] Custom email confirmation on registration
<?php
/**
* Plugin Name: Email Confirmation
* Description: Send an email to the user with confirmation code and store form data in database until user confirms.
* Author: Cedric Ruiz
*/
class EmailConfirmation
{
const PREFIX = 'email-confirmation-';
@qutek
qutek / rh_get_widget_data_for.php
Last active August 29, 2015 14:07 — forked from kingkool68/rh-get-widget-data-for-all-sidebars.php
[Wordpress] Display raw widget data
function rh_get_widget_data_for($sidebar_name) {
global $wp_registered_sidebars, $wp_registered_widgets;
// Holds the final data to return
$output = array();
// Loop over all of the registered sidebars looking for the one with the same name as $sidebar_name
$sibebar_id = false;
foreach( $wp_registered_sidebars as $sidebar ) {
if( $sidebar['name'] == $sidebar_name ) {
@qutek
qutek / gist:a700c5b8b231e99c1d07
Last active November 29, 2015 20:25 — forked from saetia/gist:1623487
OSX Preference

OS X Preferences


#Disable window animations
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false

#Enable repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
@qutek
qutek / repeatable-fields-metabox.php
Last active August 29, 2015 14:21 — forked from helen/repeatable-fields-metabox.php
Repeatable field for metabox
<?php
/**
* Repeatable Custom Fields in a Metabox
* Author: Helen Hou-Sandi
*
* From a bespoke system, so currently not modular - will fix soon
* Note that this particular metadata is saved as one multidimensional array (serialized)
*/
function hhs_get_sample_options() {
@qutek
qutek / whatissoslow.php
Last active August 29, 2015 14:27 — forked from Viper007Bond/whatissoslow.php
WordPress: Times how long it takes each filter and action to run and displays results at the end of the page. Quick and dirty.
<?php
/**
* This little class records how long it takes each WordPress action or filter
* to execute which gives a good indicator of what hooks are being slow.
* You can then debug those hooks to see what hooked functions are causing problems.
*
* This class does NOT time the core WordPress code that is being run between hooks.
* You could use similar code to this that doesn't have an end processor to do that.
*
@qutek
qutek / fix-homebrew-npm.md
Created November 5, 2015 06:11 — forked from DanHerbert/fix-homebrew-npm.md
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

Fixing npm On Mac OS X for Homebrew Users

If you just want to fix the issue quickly, scroll down to the "solution" section below.

Explanation of the issue

If you're a Homebrew user and you installed node via Homebrew, there is a major philosophical issue with the way Homebrew and NPM work together. If you install node with Homebrew and then try to do npm update npm -g, you may see an error like this:

$ npm update npm -g
@qutek
qutek / horizontal-infinite-carousel.html
Created April 16, 2017 05:24 — forked from dongyuwei/horizontal-infinite-carousel.html
infinite loop carousel(vertical or horizontal)
@qutek
qutek / webpack.mix.js
Created September 16, 2019 15:31 — forked from kellymears/webpack.mix.js
[Gutenberg Webpack Mix] #gutenberg #mix #js
const mix = require('laravel-mix');
const url = 'http://lab.tinypixel.test';
const app = './src';
const config = './config';
const resources = './resources';
const assets = './resources/assets';
const dist = './dist';
const externals = {