This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$email = "youremail@example.com"; | |
$apikey = yourkey; | |
$zoneid = yourzone; | |
$ch = curl_init( 'https://api.cloudflare.com/client/v4/zones/' . $zoneid . '/purge_cache' ); | |
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array('purge_everything' => true)) ); | |
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE"); | |
curl_setopt($ch, CURLOPT_HTTPHEADER, array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#from https://www.linux.com/learn/how-use-docker-machine-create-swarm-cluster | |
#export digital ocean token | |
export DO_TOKEN="abcdefghijklmnopqrstuvwxyz" | |
#make keystore | |
docker-machine create -d digitalocean \ | |
-digitalocean-access-token ${DO_TOKEN} \ | |
--digitalocean-region "nyc1" \ | |
--digitalocean-image="ubuntu-14-04-x64" \ | |
--digitalocean-size "512mb" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ignore everything in the root except the "wp-content" directory. | |
/* | |
!.gitignore | |
!wp-content/ | |
# Ignore everything in the "wp-content" directory, except the "plugins" | |
# and "themes" directories. | |
wp-content/* | |
!wp-content/plugins/ | |
!wp-content/themes/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var url = window.location.hash.toString(); | |
var anchor = '#' + url.split('#')[1]; | |
//if a hash is in a url, show that div | |
if (url.match('#')) $(anchor).show(); | |
// if the hash changes, show that div | |
$(window).bind('hashchange', function() { | |
$(anchor).show(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone git://git.libusb.org/libusb.git | |
./autogen.sh | |
./configure | |
make | |
make install | |
# pkg-config --libs libusb-1.0 | |
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$( this ).imagesLoaded(function() { | |
$container = $( '#container' ); | |
function gallery_item_width() { | |
width = Math.floor( ($('#primary').width()) / 3 ); | |
$( '#container .item' ).width( width + 'px' ); | |
} | |
$(window).smartresize( gallery_item_width() ); |
NewerOlder