Skip to content

Instantly share code, notes, and snippets.

Lyon Sun lyonsun

Block or report user

Report or block lyonsun

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lyonsun
lyonsun / image-grid-with-flex.css
Last active May 11, 2018
simple and nice images grid layout using flex only
View image-grid-with-flex.css
#photos {
display: flex;
flex-wrap: wrap;
flex-direction: row;
}
#photos div {
flex: auto;
width: 150px;
margin: 5px;
@lyonsun
lyonsun / 1 Gist conventions
Last active Aug 3, 2017 — forked from PavelBezpalov/1 Gist conventions
Deploy Rails 5.0.0.beta3 to VPS(Ubuntu 14.04.4 LTS). Nginx, Puma, Capistrano3, PostgreSQL, Rbenv.
View 1 Gist conventions
<<APP>> change this variables
@lyonsun
lyonsun / index.html
Created Feb 28, 2016 — forked from anonymous/index.html
Parallax backgrounds with centered content Parallax backgrounds with centered content // source http://jsbin.com/roqiqedipa
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Parallax backgrounds with centered content</title>
<meta name="description" content="Parallax backgrounds with centered content">
<style id="jsbin-css">
/* background setup */
.background {
background-repeat:no-repeat;
@lyonsun
lyonsun / stopmysql.sh
Created Dec 9, 2015
shut down mysql from console.
View stopmysql.sh
#!/usr/bin/env bash
sudo mysqladmin shutdown --user=*user* --password=*password*
@lyonsun
lyonsun / config.json
Created Dec 8, 2015 — forked from anonymous/config.json
Bootstrap Customizer Config
View config.json
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#2fa4e7, 6.5%)",
"@brand-success": "#73a839",
@lyonsun
lyonsun / select2_select_all.js
Created Oct 28, 2015
add a checkbox input and use this code to select or unselect all.
View select2_select_all.js
// credits: http://jsfiddle.net/jeadr/62/
$("#e1").select2();
$("#checkbox").click(function(){
if($("#checkbox").is(':checked') ){
$("#e1 > option").prop("selected","selected");
$("#e1").trigger("change");
}else{
$("#e1 > option").removeAttr("selected");
$("#e1").trigger("change");
View crack-bc4.sh
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
##############################
#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.real &
View gist:641c2dcf8b3b5c3f14ab
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
@lyonsun
lyonsun / gitlog.shell
Last active Aug 29, 2015
git log compact commit messages.
View gitlog.shell
git log --since=1/11/2011 --until=28/07/2015 --no-merges --format=%cd%n%B --date=local > CHANGELOG.TXT
@lyonsun
lyonsun / movable.css
Created Dec 24, 2014
css3 animation.
View movable.css
.movable
{
/*width:60px;
height:40px;*/
background:#FF6560;
/*color:#ffffff;*/
position:relative;
font-weight:bold;
font-size:20px;
You can’t perform that action at this time.