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
@echo off | |
pushd %1 | |
"C:\Program files\PDFCreator\Images2PDF\Images2PDFC.exe" /i "%1\*.tif" /e "%1\compilado.pdf" | |
"%1\compilado.pdf |
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
@ECHO OFF | |
SETLOCAL EnableDelayedExpansion | |
SET _c=0 | |
FOR /F "delims=: tokens=1,2" %%A IN ('ipconfig') DO ( | |
FOR /F "tokens=2" %%C IN ("%%A") DO ( | |
IF !_c! EQU 0 IF /I %%C==IPv4. ( echo %%B & SET /A _c+=1 ) | |
) | |
) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:400italic,400,700' rel='stylesheet' type='text/css'> | |
<link href='http://grommet.io/assets/latest/css/grommet.min.css' rel='stylesheet' type='text/css'> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.2/react.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.2/react-dom.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.js"></script> |
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 | |
namespace Controller; | |
use Silex\ControllerResolver as SilexControllerResolver; | |
use Symfony\Component\HttpFoundation\Request; | |
use \Pimple; | |
/** | |
* Extension of Silex\ControllerResolver, as that injects Application class if | |
* its requested by Controller by Typehinting; this looks for, and injects, | |
* services with same name as parameter argument and validates is the right |
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 | |
// Load WordPress | |
require_once 'path/to/www/wp-load.php'; | |
require_once ABSPATH . '/wp-admin/includes/taxonomy.php'; | |
// Set the timezone so times are calculated correctly | |
date_default_timezone_set('Europe/London'); | |
// Create post |
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 | |
function iframe_render_shortcode($atts) { | |
$keys = array_flip(array_keys($atts)); | |
$params = shortcode_atts($keys, $atts); | |
$out = []; | |
foreach($params as $key => $val) { | |
$out[] = $key . '="' . $val . '"'; | |
} | |
return '<iframe ' . implode(' ', $out) . '></iframe>'; | |
} |
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 | |
/** | |
* This is a straightforward example of what a ThemeClass may look like. It contains all the | |
* expected initialization, and wp_enqueue_script calls. | |
*/ | |
class ThemeClass | |
{ | |
protected $wp; | |
protected $themeDirectory; |
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
function fact(i) { | |
return i === 1 ? 1 : i * fact(i-1); | |
} | |
console.time('fact recursive naive'); | |
for(var i = 0; i<1000000 ; i++) { | |
var g=fact(170); | |
} | |
console.log(g); | |
console.timeEnd('fact recursive naive'); | |
metaparse("metafun fact_m(self, i, acc) { " + |
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
// React component | |
var Counter = React.createClass( { | |
render: function() { | |
var value = this.props.value; | |
var onIncreaseClick = this.props.onIncreaseClick; | |
return ( | |
React.createElement("div", null, | |
React.createElement("span", null, value), | |
React.createElement("button", {onClick: onIncreaseClick}, "Increase") | |
) |
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 | |
/** | |
* @package One_Fix_Switch_Theme | |
* @version 1.0 | |
*/ | |
/* | |
Plugin Name: One Fix Switch Theme | |
Plugin URI: https://www.1fix.io | |
Description: Switch theme on certain pages. | |
Author: Yoren Chang |