Skip to content

Instantly share code, notes, and snippets.

View giiska's full-sized avatar
🌴
On vacation

Null giiska

🌴
On vacation
  • Godada
View GitHub Profile
@giiska
giiska / .gemrc
Last active August 29, 2015 14:04 — forked from jch/.gemrc
中国用户的 gemrc, gemrc for coder in China
# http://guides.rubygems.org/command-reference/#gem-environment
---
:backtrace: true
:bulk_threshold: 1000
:benchmark: false
:sources:
- http://ruby.taobao.org/
:update_sources: true
:verbose: true
gem: --no-document
var Events = (function() {
// Backbone.js 0.9.10
// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc.
// Backbone may be freely distributed under the MIT license.
// For all details and documentation:
// http://backbonejs.org
// Create a local reference to array methods.
var array = [];
@giiska
giiska / random.js
Last active August 29, 2015 14:08 — forked from kerimdzhanov/random.js
// @return [float] a random number between min and max
function getRandom(min, max) {
return Math.random() * (max - min) + min;
}
// @return [integer] a random int between min and max
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1) + min);
}
@giiska
giiska / install-tmux
Created September 30, 2015 06:25 — forked from rothgar/install-tmux
Install tmux 1.9 on rhel/centos 6
# Install tmux on Centos release 6.5
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar -xvzf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure --prefix=/usr/local
@giiska
giiska / GraphicsMagick.sh
Created October 12, 2015 03:26 — forked from paul91/GraphicsMagick.sh
How to install GraphicsMagick on CentOS 6.4
#!/bin/bash
# Install build dependencies
yum install -y gcc libpng libjpeg libpng-devel libjpeg-devel ghostscript libtiff libtiff-devel freetype freetype-devel
# Get GraphicsMagick source
wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.9.tar.gz
tar zxvf GraphicsMagick-1.3.9.tar.gz
# Configure and compile
@giiska
giiska / gist:fb4574f8f578f662d965
Created October 13, 2015 01:34 — forked from pranildasika/gist:2964211
Virtual fields using getter and setter methods in sequelize
var Sequelize = require('sequelize')
var sequelize = new Sequelize('sequelize_test', 'root')
//Note that the model definition does not have "fullName"
var User = sequelize.define('User', {
email: Sequelize.STRING,
firstName: Sequelize.STRING,
lastName: Sequelize.STRING,
},
{
@giiska
giiska / Unicode中文和特殊字符的编码范围
Created October 15, 2015 05:34 — forked from shingchi/Unicode中文和特殊字符的编码范围
Unicode中文和特殊字符的编码范围
根据Unicode5.0整理如下:
1)标准CJK文字
http://www.unicode.org/Public/UNIDATA/Unihan.html
2)全角ASCII、全角中英文标点、半宽片假名、半宽平假名、半宽韩文字母:FF00-FFEF
http://www.unicode.org/charts/PDF/UFF00.pdf
3)CJK部首补充:2E80-2EFF
http://www.unicode.org/charts/PDF/U2E80.pdf
| 名称 | Unicode | 符号 |
| ---- | ------- | ---- |
| 间隔号 | 00B7\U+FF0E | ·\. |
| 连接号 | 2013 | – |
| 破折号 | 2014 | —— |
| 引号 | 2018\2019 | ‘’ |
| 引号 | 201C\201D | “” |
| 省略号 | 2026 | …… |
| 顿号 | 3001 | 、 |
| 句号 | 3002 | 。 |
@giiska
giiska / scopes.txt
Created November 9, 2015 01:42 — forked from iambibhas/scopes.txt
Sublime Text 2: Snippet scopes
Here is a list of scopes to use in Sublime Text 2 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
CoffeeScript: source.coffee
@giiska
giiska / README.md
Created November 17, 2015 11:59 — forked from ngryman/README.md
intellij javascript live templates

intellij javascript live templates

Just a dump of handy live templates I use with IntelliJ. They should also work with WebStorm.

How to

  • Go to settings.
  • Search for live templates.
  • Under the javascript section you should be able to manage your templates.