Skip to content

Instantly share code, notes, and snippets.

@Garconis
Garconis / acf-states.txt
Created August 10, 2018 16:21 — forked from michaeldozark/acf-states.txt
State list for Advanced Custom Fields select field
AL : Alabama
AK : Alaska
AZ : Arizona
AR : Arkansas
CA : California
CO : Colorado
CT : Connecticut
DE : Delaware
DC : District of Columbia
FL : Florida
@shimar
shimar / Vagrantfile
Created February 28, 2017 04:28
mongodb on vagrant.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@sistematico
sistematico / config.cfg
Last active September 20, 2017 12:57
ShoutCast + sc_trans Init Script para Debian & Arch Linux(modificações necessárias)
# Este arquivo deve ficar em /home/radio/config.cfg ou qualquer outro PATH que desejar...
# As variaveis aqui contidas já existem no script /etc/init.d/shoutcas porem serão sobre-escritas se você preferir.
# Diretórios não pesquisados durante a criação da lista
EXCLUDE="Vinhetas|Amado Batista|Barrerito"
# Shoutcast Vars
#HOME="/home/radio"
#SHOUT_HOME="/home/radio/shoutcast"
#SHOUT_PID=$(pidof sc_serv)
@sistematico
sistematico / downloads.txt
Last active February 2, 2024 10:22
ShoutCast Scripts
Downloads 64 bits:
sc_serv: https://dl.dropbox.com/s/awj65gxyighz4ro/sc_serv2_linux_x64-latest.tar.gz?dl=1
sc_trans: https://dl.dropbox.com/s/ol88p5cwy9ivhvx/sc_trans_linux_x64_10_07_2011.tar.gz?dl=1
Downloads 32 bits:
sc_serv: [FALTANDO]
sc_trans: https://dl.dropbox.com/s/zfmfh0ahdv7mjx0/sc_trans_linux_10_07_2011.tar.gz?dl=1
Para baixar o último sc_serv vá até: https://www.shoutcast.com/BroadcastNow
@marciejones
marciejones / referenced_mongo_json.md
Last active January 18, 2023 10:09 — forked from bclinkinbeard/referenced_mongo_json.md
Initializing MongoDB collections from JSON files using Node.js and Mongoose

Initializing MongoDB collections from JSON files using Node.js and Mongoose

I recently began working with Node and MongoDB for a small personal project, largely just to learn the technologies. One thing that is fairly simple but that I found far from obvious and lacking in concrete examples was how to populate the part of my database that used referenced collections from the sample JSON data I was starting with. This post attempts to fill that gap using the following code snippets, which are heavily commented inline. You will notice I am using the awesome Mongoose library which makes working with MongoDB very easy.

http.createServer( app ).listen( app.get( 'port' ), function() {

    mongoose.connect( 'mongodb://localhost/{YOUR_DB_NAME}' );

	var db = mongoose.connection;
@MikeNGarrett
MikeNGarrett / wp-config.php
Last active April 26, 2024 10:15
All those damned wp-config constants you can never remember.
<?php
// PHP memory limit for this site
define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' ); // Increase admin-side memory limit.
// Database
define( 'WP_ALLOW_REPAIR', true ); // Allow WordPress to automatically repair your database.
define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); // Don't make database upgrades on global tables (like users)
// Explicitely setting url
@yaronguez
yaronguez / ACF Country List
Created February 17, 2015 01:37
Country list formatted for Advanced Custom Fields select dropdown
afghanistan : Afghanistan
albania : Albania
algeria : Algeria
american_samoa : American Samoa
andorra : Andorra
angola : Angola
anguilla : Anguilla
antigua_and_barbuda : Antigua and Barbuda
argentina : Argentina
armenia : Armenia
@jlengstorf
jlengstorf / README.md
Created October 8, 2014 20:28
Adds responsive embedding to WordPress oEmbed content.

Responsive Embeds in WordPress

This snippet filters oEmbed output in WordPress (the_content()) to force responsive embeds.

Usage

To use, add the contents of responseive_embeds.less to your site's stylesheet (if you're not using LESS, don't forget to move the iframe,object,embed rule outside of .embed-container and change it to .embed-container iframe,.embed-container object,.embed-container embed).

Then add the responsive_embed() function to your theme's functions.php and insert the add_filter() call in your theme's setup function.

@6174
6174 / Random-string
Created July 23, 2013 13:36
Generate a random string in JavaScript In a short and fast way!
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
@claudiosanches
claudiosanches / add-to-cart.php
Last active October 18, 2023 14:02
WooCommerce - Template add-to-cart.php with quantity and Ajax!
<?php
/**
* Custom Loop Add to Cart.
*
* Template with quantity and ajax.
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly.
global $product;