Skip to content

Instantly share code, notes, and snippets.

View indapublic's full-sized avatar
🏠
Working from home

Vasilii indapublic

🏠
Working from home
View GitHub Profile
<?
require_once '../../CImage.php';
$sourceFileName = '../../webroot/img/issue40/1280x720.jpg';
$resultFileName = '../../webroot/img/issue40/652x466.jpg';
$imgOptions = array(
'newWidth' => 652,
'newHeight' => 466,
{
"_comments": [
"Valid terminals include: 'Terminal.app' or 'iTerm'",
"In the editor value change 'default' to 'nano', 'vi', or another terminal based editor.",
"Hosts will also be read from your ~/.ssh/config or /etc/ssh_config file, if available",
"For more information on how to configure, please see http://fitztrev.github.io/shuttle/"
],
"editor": "default",
"launch_at_login": false,
"terminal": "iTerm",
{
"_comments": [
"Valid terminals include: 'Terminal.app' or 'iTerm'",
"In the editor value change 'default' to 'nano', 'vi', or another terminal based editor.",
"Hosts will also be read from your ~/.ssh/config or /etc/ssh_config file, if available",
"For more information on how to configure, please see http://fitztrev.github.io/shuttle/"
],
"editor": "default",
"launch_at_login": false,
"terminal": "iTerm",
{
"_comments": [
"Valid terminals include: 'Terminal.app' or 'iTerm'",
"In the editor value change 'default' to 'nano', 'vi', or another terminal based editor.",
"Hosts will also be read from your ~/.ssh/config or /etc/ssh_config file, if available",
"For more information on how to configure, please see http://fitztrev.github.io/shuttle/"
],
"editor": "default",
"launch_at_login": false,
"terminal": "iTerm",
{
"_comments": [
"Valid terminals include: 'Terminal.app' or 'iTerm'",
"In the editor value change 'default' to 'nano', 'vi', or another terminal based editor.",
"Hosts will also be read from your ~/.ssh/config or /etc/ssh_config file, if available",
"For more information on how to configure, please see http://fitztrev.github.io/shuttle/"
],
"editor": "default",
"launch_at_login": false,
"terminal": "iTerm",
{
"Ansi 7 Color" : {
"Green Component" : 0.7333333492279053,
"Blue Component" : 0.7333333492279053,
"Red Component" : 0.7333333492279053
},
"Tags" : [
],
"Ansi 12 Color" : {
@indapublic
indapublic / gist:a9ae39b72cfac8643a1b
Created December 25, 2015 05:35
Nsmarty template example
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<p>Hello, {$name}</p>
<a href="/">Index</a> | <a href="/one">One</a> | <a href="/two">Two</a> | <a href="/three">Three</a>
</body>
</html>
@indapublic
indapublic / gist:e4331f207fab836ca02c
Created December 25, 2015 05:35
Nsmarty example
var
util = require('util'),
http = require('http'),
nsmarty = require('nsmarty'),
Router = require('node-simple-router');
var router = new Router();
nsmarty.tpl_path = __dirname + '';
ALTER TABLE `shop_product_reviews` CHANGE `id` `id` BIGINT(11);
ALTER TABLE `shop_product_reviews` CHANGE `left_key` `left_key` BIGINT(11);
ALTER TABLE `shop_product_reviews` CHANGE `right_key` `right_key` BIGINT(11);
ALTER TABLE `shop_product_reviews` CHANGE `depth` `depth` BIGINT(11);
ALTER TABLE `shop_product_reviews` CHANGE `parent_id` `parent_id` BIGINT(11);
ALTER TABLE `shop_product_reviews` CHANGE `product_id` `product_id` BIGINT(11);
ALTER TABLE `shop_product_reviews` CHANGE `review_id` `review_id` BIGINT(11);
ALTER TABLE `shop_product_reviews` CHANGE `contact_id` `contact_id` BIGINT(11);
ALTER TABLE `shop_product_reviews` CHANGE `ip` `ip` BIGINT(11);
App.js
import { Router, Route, IndexRoute, browserHistory } from 'react-router'
render() {
return (
<Router history={browserHistory}>
<Route path="/" component={Main}>
<IndexRoute component={Home} />
<Route path="*" component={NotFound} status={404} />