Skip to content

Instantly share code, notes, and snippets.

安装centOS 后 某些服务不是自动启动
chkconfig 可以检查和 设置服务自动启动
#chkconfig --list
输出 所有服务列表
如果列表中没有你要启动的服务
@visamz
visamz / baciuzzi_queue.conf
Last active March 27, 2020 06:44
Beanstalkd and Supervisor Config. For CentOS, a modified /etc/init.d/beanstlkd file which creates a pid file in /var/run/beanstalkd.pid
[program:baciuzzi_queue]
directory=/data2/www/baciuzzi
command=php artisan queue:listen --tries=3
stdout_logfile=/data2/www/baciuzzi/app/storage/logs/supervisor.log
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=10
stdout_capture_maxbytes=1MB
stderr_logfile=/data2/www/baciuzzi/app/storage/logs/supervisor_error.log
stderr_logfile_maxbytes=1MB
stderr_logfile_backups=10
@visamz
visamz / Homestead.yaml
Created November 25, 2014 08:53
homestead 1.0 yaml file config
---
ip: "192.168.1.89"
memory: 2048
cpus: 1
network: "public_network"
authorize: E:/Homestead/ssh/id_rsa.pub
keys:
- E:/Homestead/ssh/id_rsa
@visamz
visamz / base64.js
Created December 13, 2014 15:03
base64的js实现
/**
*
* Base64 encode / decode
* originUrl: http://tuhaitao.iteye.com/blog/653244
*/
function Base64() {
// private property
_keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
@visamz
visamz / dataset.js
Last active August 29, 2015 14:11
datatables-dataset
{
"data": [
{
"DT_RowId": "row_1", // DT_RowId 是主键,可自定义
//数据字段遵循 key: value
"users": { //users Model
"first_name": "Quynn",
"last_name": "Contreras",
"phone": "1-971-977-4681",
"site": "1"
@visamz
visamz / gist:a77e37329af2257b0b21
Created April 30, 2015 08:08
js 验证汉字的正则
/([\u4E00-\u9FA5]|[\uFE30-\uFFA0])/g.test('中国')
@visamz
visamz / 0_reuse_code.js
Last active August 29, 2015 14:27
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@visamz
visamz / javascript_resources.md
Last active August 29, 2015 14:27 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@visamz
visamz / css_resources.md
Last active August 29, 2015 14:27 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@visamz
visamz / timezones.js
Created December 10, 2015 05:38
timezone json
var PRE_REQUIREMENT = {
"timezones": [{
"text": "(Etc/GMT+12,-12:00) GMT-12:00",
"value": "Etc/GMT+12",
"offset": "-12:00"
}, {
"text": "(Etc/GMT+11,-11:00) GMT-11:00",
"value": "Etc/GMT+11",
"offset": "-11:00"
}, {