Skip to content

Instantly share code, notes, and snippets.

@shynome
shynome / 0_reuse_code.js
Created March 15, 2017 02:31
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
<!-- 1. Add latest jQuery and fancyBox files -->
<script src="//code.jquery.com/jquery-3.1.1.min.js"></script>
<link href="/path/to/jquery.fancybox.min.css" rel="stylesheet">
<script src="/path/to/jquery.fancybox.min.js"></script>
<!-- 2. Create links -->
@shynome
shynome / own.js
Created March 16, 2017 03:33
fancybox
void function fancybox(){
var x = $('.fancybox')
, y = $('.fancybox-thumb')
$(document).on('click.clear','a.fancybox,a.fancybox-thumb',function(e){e.preventDefault()})
if(!$('.fancybox,.fancybox-ajax,.fancybox-thumb,.fancybox-thumb-ajax').length)return;
var deps = $.when()
var deps_thumb = $.when()
var options = {
helpers : {
thumbs : {
@shynome
shynome / setup.sh
Last active December 13, 2017 07:37 — forked from eduwass/setup.sh
Flynn Install : Single node ( for Ubuntu 16.04 x64 @ DigitalOcean droplet )
#!/bin/bash
# This script will automatically set up a single node Flynn Cluster on your linux box
# Fresh Flynn install with domain provided by the xip.io service
# Tested with Base Image: Ubuntu 14.04 x64 @ DigitalOcean droplet
# @date 16 Nov 2015
# @author Edu Wass (eduwass at gmail com)
echo '---- START SETUP ----'
@shynome
shynome / MANUAL.md
Created January 13, 2018 11:15 — forked from s-lyn/MANUAL.md
Deploy nodejs app with gitlab.com and pm2

Deploy nodejs app with gitlab.com and pm2

This manual is about setting up an automatic deploy workflow using nodejs, PM2, nginx and GitLab CI. It is tested on:

  • Target server: Ubuntu 16.04 x64. This is suitable for Ubuntu 14.x.
  • Windows 10 on my PC to work.
@shynome
shynome / .hyper.js
Created March 4, 2018 16:23
hyper issue 2018-3-5
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@shynome
shynome / readme.md
Last active March 5, 2018 02:40 — forked from techgaun/readme.md
OpenSSH 7.4 on Ubuntu 16.04

Installing OpenSSH on Ubuntu 16.04

version='7.4'
sudo apt install -y build-essential libssl-dev zlib1g-dev
wget "http://mirrors.evowise.com/pub/OpenBSD/OpenSSH/portable/openssh-${version}p1.tar.gz"
tar xfz openssh-${version}p1.tar.gz && cd openssh-${version}p1
./configure
make
sudo make install
@shynome
shynome / README.md
Last active June 6, 2018 15:53
Centos 快速安装 Docker

一条命令快速在 CentOS 上安装 Docker

curl https://gist.github.com/shynome/567e4535892bea77c2df2507ebc9b18e/raw/307e15382d4d8d2bf31d1e9232b95129cd3900e3/install.sh | sh
@shynome
shynome / Dockerfile
Last active June 12, 2018 11:04
Tmux sshd alpine container
FROM hermsi/alpine-sshd
EXPOSE 22
ENTRYPOINT ["/entrypoint.sh"]
RUN set -e && \
sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories && \
apk add --no-cache vim tmux