Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
import { Component } from "React"; | |
export var Enhance = ComposedComponent => class extends Component { | |
constructor() { | |
this.state = { data: null }; | |
} | |
componentDidMount() { | |
this.setState({ data: 'Hello' }); | |
} | |
render() { |
/* global Application, ObjC, $ */ | |
/** | |
* repozish.js | |
* | |
* this is an example of using os x yosemite's "JavaScript for Automation": | |
* | |
* https://developer.apple.com/library/prerelease/mac/releasenotes/interapplicationcommunication/rn-javascriptforautomation/index.html | |
* | |
* it repositions some windows based on some position settings. you can run |
var spawn = require('child_process').spawn, | |
sys = require('sys'); | |
function createSSH(passphrase, path, name) { | |
var ssh = spawn('ssh-keygen', ['-trsa', '-N \''+ passphrase +'\'', '-f ' + name], { cwd:path, env: process.env, customFds: [-1, -1, -1]}) | |
ssh.on('exit', function (code, signal) { | |
process.exit(); | |
}); |
NSLog(@"HostName: %@", [[NSProcessInfo processInfo] hostName]); | |
//globallyUniqueString 唯一的标示符,每次调用都会不一样,可以用作一些临时缓存文件的名字 | |
NSLog(@"GlobalUniqueString: %@", [[NSProcessInfo processInfo] globallyUniqueString]); | |
//操作系统名称 | |
NSLog(@"OperatingSystemName: %@", [[NSProcessInfo processInfo] operatingSystemName]); | |
//操作系统版本 | |
NSLog(@"OperatingSystemVersion: %@", [[NSProcessInfo processInfo] operatingSystemVersionString]); | |
//物理内存 | |
NSLog(@"PhysicalMem: %llu", [[NSProcessInfo processInfo] physicalMemory]); | |
//进程名称 |
//To run Q.js examples: | |
// 1. Open a new browser tab in Chrome and turn on developer toolbar (or open any http site). | |
// 2. Copy/Paste this gist in the console and hit enter to run the snippets. | |
// Based on the inspiration from samples @ https://github.com/kriskowal/q | |
//////////////////////////////////////////////////////////////////// | |
//////////////////////////////////////////////////////////////////// |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
SET FOREIGN_KEY_CHECKS = 0; | |
DROP TABLE IF EXISTS comments; | |
DROP TABLE IF EXISTS comment_paths; | |
CREATE TABLE comments ( | |
comment_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, | |
PRIMARY KEY(comment_id) | |
); |
-- 1. apt-get install prosody-trunk | |
-- 2. Checkout prosody-modules on Google Code | |
-- 3. Move all modules to /usr/lib/prosody/modules | |
-- 4. Move the mod_smacks module to mod_smacks2 and copy it to mod_smacks3 | |
-- 5. Move the files in mod_smacks* to match the new names | |
-- 6. In mod_smacks3/mod_smacks3.lua s/urn:xmpp:sm:2/urn:xmpp:sm:3/g | |
-- 7. Set the Prosody configuration to: | |
admins = { "ADMIN@HOST" } | |
daemonize = true |
This is a very simple approach to doing role-based access control with Neo4j. It is optimistic, in the sense that all items are assumed to be world-readable unless they have specific constraints. Item visibility can be constrained to either individual users or all users who belong to a role. Roles are also hierarchical, so can inherit privileges from other roles.
First, lets create our basic example data:
sudo port install php56 +fastcgi fcgi apache-ant php56-cgi php56-mbstring php56-curl php56-mcrypt php56-imagick php56-xdebug php56-iconv php56-mongo php56-oauth php56-openssl php56-esmtp php56-pop3 php56-tidy php56-uploadprogress php56-pcntl php56-sockets php56-soap php56-ssh2 php56-big_int php56-gd php56-svm php56-html_parse php56-http php56-mysql php56-pdflib php56-pear php56-peb php56-posix php56-pspell php56-rar php56-redis php56-snmp php56-stomp php56-svn php56-wddx php56-xmlrpc php56-yaml php56-zip php56-dbase php56-excel php56-gdchart php56-imap php56-xsl php56-redis | |
sudo port install postgresql94 postgresql94-server postgresql94-doc postgresql_autodoc php56-postgresql phppgadmin postgresql-jdbc phpmyadmin maven3 maven-ant-tasks postgis2 +postgresql94 git qgis re2c json-c | |
sudo port install nginx +flv +geoip +gzip_static +mail +mp4 +ssl +status +substitution +upload +upload_progress +xslt +zip |