Skip to content

Instantly share code, notes, and snippets.

<VirtualHost *:80>
ServerName default.test
DocumentRoot /var/www/html
ServerAdmin info@default.test
ErrorLog ${APACHE_LOG_DIR}/dev-error.log
CustomLog ${APACHE_LOG_DIR}/dev-access.log combined
RewriteEngine On
<Directory /var/www/html>
Image Contain Methods
1. Background Image
<div style="background-image: url('{{ item.image_medium.url }}');"></div>
div {
width: 100%;
height: 100%;
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/ko/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
" copy and paste
source $VIMRUNTIME/mswin.vim
filetype on
filetype plugin on
filetype indent on
syntax on
set autowrite
set ruler
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "ctrl+d",
"command": "editor.action.addSelectionToNextFindMatch",
"when": "editorFocus"
},
// {
// "key": "ctrl+shift+oem_7",
// "command": "workbench.action.terminal.focusPrevious"
@UncleKo
UncleKo / settings.json
Created November 6, 2021 03:06
settings.json
{
"editor.fontFamily": "Input Mono",
"editor.wordWrap": "on",
"explorer.openEditors.visible": 0,
"emmet.triggerExpansionOnTab": true,
"emmet.includeLanguages": {
"javascript": "html",
"vue-html": "html",
"vue": "html"
},
/* ============================================================
*
* @requires jquery.1.12.4.js
*
==============================================================*/
!function(t){function e(){var e,i,n={height:a.innerHeight,width:a.innerWidth};return n.height||(e=r.compatMode,(e||!t.support.boxModel)&&(i="CSS1Compat"===e?f:r.body,n={height:i.clientHeight,width:i.clientWidth})),n}function i(){return{top:a.pageYOffset||f.scrollTop||r.body.scrollTop,left:a.pageXOffset||f.scrollLeft||r.body.scrollLeft}}function n(){var n,l=t(),r=0;if(t.each(d,function(t,e){var i=e.data.selector,n=e.$element;l=l.add(i?n.find(i):n)}),n=l.length)for(o=o||e(),h=h||i();n>r;r++)if(t.contains(f,l[r])){var a,c,p,s=t(l[r]),u={height:s.height(),width:s.width()},g=s.offset(),v=s.data("inview");if(!h||!o)return;g.top+u.height>h.top&&g.top<h.top+o.height&&g.left+u.width>h.left&&g.left<h.left+o.width?(a=h.left>g.left?"right":h.left+o.width<g.left+u.width?"left":"both",c=h.top>g.top?"bottom":h.top+o.height<g.top+u.height?"top":"both",p=a+"-"+c,v
@UncleKo
UncleKo / a Sample of gruntfile.js
Last active August 29, 2015 14:07
a Sample of gruntfile.js
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-open');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.initConfig({
connect: {
server: {
@UncleKo
UncleKo / an Accordion Menu Sample
Last active August 29, 2015 13:57
Just a sample for according menu using jQuery. I took this approach to keep the opening status to a liked page; it might be much easier than using cookie or other approaches. Here's a living example if you would like check html code: http://shrewd-design.com/blog/
$(function () {
var widgetAccordion = function() {
var $widget = $('aside .widget'),
// set the default status for the blog top page
dft = true;
$widget.children('ul').each( function() {
@UncleKo
UncleKo / Susy Responsive Test
Last active December 14, 2015 18:49
I'm just new to Susy and testing it now at http://ktee8.com/test/susy_test.html :: Here are excerption for those Susy part (mainly) from my Sass file. I know it might be not the best way. Please let me know if I can make it better.
@import "compass/typography/vertical_rhythm";
@import "compass/css3";
@import "compass/utilities";
@import "libs/reset";
@import "libs/settings";
@import "libs/mixins";
@import "susy";
@import "sassy-buttons";