Skip to content

Instantly share code, notes, and snippets.

View vburlak's full-sized avatar
🚀

Vladislav Burlak vburlak

🚀
View GitHub Profile
@nateroling
nateroling / deploy.addendum.rb
Last active July 15, 2016 07:11
Roots Bedrock: Copy production assets for Roots theme
# The Roots theme by default does not check production assets into Git, so
# they are not deployed by Capistrano when using the Bedrock stack. The
# following will compile and deploy those assets. Copy this to the bottom of
# your config/deploy.rb file.
# Based on information from this thread:
# http://discourse.roots.io/t/capistrano-run-grunt-locally-and-upload-files/2062/7
# and specifically this gist from christhesoul:
# https://gist.github.com/christhesoul/3c38053971a7b786eff2
@jayj
jayj / Gruntfile.js
Last active March 13, 2022 16:47
Using Grunt to automate theme releases
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON( 'package.json' ),
// Bump version numbers
version: {
css: {
options: {
prefix: 'Version\\:\\s'
@teledirigido
teledirigido / wpinstall.sh
Last active March 26, 2024 10:23
Download and Install Wordpress via WP-CLI
#!/bin/bash
# This bash script works JUST with WP-CLI
# You can get it from here:
# http://wp-cli.org/
#
# If you don't know what to do with this file:
#
# 1) Install wp-cli on your workspace
# 2) Create a file call wpinstall.sh
@roborourke
roborourke / vine-oembed.php
Created April 23, 2014 16:28
A WordPress plugin for embedding content from vine
<?php
/*
Plugin Name: Vine oEmbed
Plugin URI: http://interconnectit.com
Description: Registers an oEmbed handler for Vine URLs
Version: 1.0
Author: Robert O'Rourke
Author URI: http://interconnectit.com
*/
var keywords_color_regex = /^[a-z]*$/;
var hex_color_regex = /^#[0-9a-f]{3}([0-9a-f]{3})?$/;
var rgb_color_regex = /^rgb\(\s*(0|[1-9]\d?|1\d\d?|2[0-4]\d|25[0-5])%?\s*,\s*(0|[1-9]\d?|1\d\d?|2[0-4]\d|25[0-5])%?\s*,\s*(0|[1-9]\d?|1\d\d?|2[0-4]\d|25[0-5])%?\s*\)$/;
var rgba_color_regex = /^rgba\(\s*(0|[1-9]\d?|1\d\d?|2[0-4]\d|25[0-5])%?\s*,\s*(0|[1-9]\d?|1\d\d?|2[0-4]\d|25[0-5])%?\s*,\s*(0|[1-9]\d?|1\d\d?|2[0-4]\d|25[0-5])%?\s*,\s*((0.[1-9])|[01])\s*\)$/;
var hsl_color_regex = /^hsl\(\s*(0|[1-9]\d?|[12]\d\d|3[0-5]\d)\s*,\s*((0|[1-9]\d?|100)%)\s*,\s*((0|[1-9]\d?|100)%)\s*\)$/;
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active June 8, 2025 15:03
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@davekiss
davekiss / gist:8945377
Last active October 27, 2015 17:15
Bedrock Usage

##Install Homebrew

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew upgrade
brew update
brew doctor
> Your system is ready to brew.

##Install and Update XCode from the App Store

@franz-josef-kaiser
franz-josef-kaiser / ajax_callback_tests.php
Created February 4, 2014 14:47
WordPress plugin to test which kinds of callbacks work for AJAX: namespaced, closures, class based, static vs. non static, etc.
<?php
namespace WCM\Tests;
/**
* Plugin Name: Ajax Namespace Callback Test
*/
/**
* MarkUp
@mdrubba
mdrubba / ACF Options Page
Created January 27, 2014 16:50
Add or Rename Optionspage for ACF Plugins and Change Capability
function md_acf_set_options_page( $settings )
{
$settings['title'] = 'flowlife';
$settings['capability'] = 'manage_options';
$settings['pages'] = array('flowlife');
return $settings;
}
add_filter('acf/options_page/settings', 'md_acf_set_options_page');
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active October 25, 2025 09:29
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k