This file contains hidden or 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
function create_post_type_html5() | |
{ | |
register_taxonomy_for_object_type('category', 'html5-blank'); // Register Taxonomies for Category | |
register_taxonomy_for_object_type('post_tag', 'html5-blank'); | |
register_post_type('html5-blank', // Register Custom Post Type | |
array( | |
'labels' => array( | |
'name' => __('HTML5 Blank Custom Post', 'html5blank'), // Rename these to suit | |
'singular_name' => __('HTML5 Blank Custom Post', 'html5blank'), | |
'add_new' => __('Add New', 'html5blank'), |
This file contains hidden or 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Sample Invoice</title> | |
<link rel="stylesheet" href="css/bootstrap.css"> | |
<style> | |
@import url(http://fonts.googleapis.com/css?family=Bree+Serif); | |
body, h1, h2, h3, h4, h5, h6{ | |
font-family: 'Bree Serif', serif; |
This file contains hidden or 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 | |
/* | |
Plugin Name: A custom post type. | |
Description: Gestion d'un custom post type avec écran de réglages. | |
Version: 1.0 | |
*/ |
This file contains hidden or 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
module = angular.module('app', []); | |
module.directive('showErrors', function ($timeout, showErrorsConfig) { | |
var getShowSuccess, linkFn; | |
getShowSuccess = function (options) { | |
var showSuccess; | |
showSuccess = showErrorsConfig.showSuccess; | |
if (options && options.showSuccess != null) { | |
showSuccess = options.showSuccess; | |
} |
This file contains hidden or 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
eval `ssh-agent -s` | |
$ scp -i /path/to/file.pem /path/to/copy/foo.gz username@<some.public.host>:/target/path/ | |
$ scp -i /path/to/file.pem username@<host>:/path/to/copy/foo.gz /target/to/paste/ | |
scp -P 18765 -r [email protected]:~/public_html ~/ |
This file contains hidden or 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
#!/bin/bash | |
#Instructions to use this script: | |
#chmod +x lamp.sh | |
#sudo ./lamp.sh | |
echo "###################################################################################" | |
echo "Please be patient: Installation begin now.......and it will take sooooome time." | |
echo "###################################################################################" |
This file contains hidden or 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 multiplo = function(value, digit){ | |
if(value % digit == 0){ | |
return true; | |
} else { | |
return false; | |
} | |
} | |
for(var i = 1; i <= 100; i++){ | |
if(multiplo(i, 3) && !multiplo(i, 5)){ |
This file contains hidden or 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
angular.module('myApp', | |
['ngRoute', 'myApp.services', 'myApp.directives'] | |
) | |
.config(function(AWSServiceProvider) { | |
AWSServiceProvider.setArn('arn:aws:iam::<ACCOUNT_ID>:role/google-web-role'); | |
}) | |
.config(function(StripeServiceProvider) { | |
StripeServiceProvider.setPublishableKey('pk_test_YOURKEY'); | |
}) | |
.config(function($routeProvider) { |
This file contains hidden or 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
/* | |
* Copyright (C) 2014 The Android Open Source Project | |
* | |
* 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 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains hidden or 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
// These two need to be declared outside the try/catch | |
// so that they can be closed in the finally block. | |
HttpURLConnection urlConnection = null; | |
BufferedReader reader = null; | |
// Will contain the raw JSON response as a string. | |
String forecastJsonStr = null; | |
try { | |
// Construct the URL for the OpenWeatherMap query |