Skip to content

Instantly share code, notes, and snippets.

View saki007ster's full-sized avatar
:octocat:

Saket Kumar saki007ster

:octocat:
View GitHub Profile
@saki007ster
saki007ster / gist:7bf775a4f5a27756faec
Created March 7, 2016 00:49
drupal instance generator
# This function is for scaffolding of drupal project.
# Note : DB must be already created before entering it.
function dsi() {
httpDir=/Applications/MAMP/htdocs
echo -n "Enter the name of Root Directory : "
read rootDir
echo -n "Enter the Site Name : "
read siteName
@saki007ster
saki007ster / README.md
Created February 6, 2016 22:16 — forked from addyosmani/README.md
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@saki007ster
saki007ster / what-forces-layout.md
Created January 31, 2016 11:10 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
@saki007ster
saki007ster / Preferences.sublime-settings
Last active September 7, 2016 08:51 — forked from pratik60/Preferences.sublime-settings
my preferences - pre material
{
"auto_indent": true,
"bold_folder_labels": true,
"caret_style": "wide",
"color_scheme": "Packages/Seti_UX/Seti.tmTheme",
"default_line_ending": "unix",
"detect_indentation": true,
"detect_slow_plugins": false,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
//----------------------------------------------------------------------
// Flexbox Containers
//
// The 'flex' value causes an element to generate a block-level flex
// container box.
//
// The 'inline-flex' value causes an element to generate a inline-level
// flex container box.
//
'use strict';
// -----------------------------------------------------------------------------
// Dependencies
// -----------------------------------------------------------------------------
var gulp = require('gulp');
var sass = require('gulp-sass');
var sourcemaps = require('gulp-sourcemaps');
@saki007ster
saki007ster / designer.html
Last active August 29, 2015 14:23
designer
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
<polymer-element name="my-element">
@saki007ster
saki007ster / designer.html
Last active August 29, 2015 14:16
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
# Simple calculator
function calc() {
local result="";
result="$(printf "scale=10;$*\n" | bc --mathlib | tr -d '\\\n')";
# └─ default (when `--mathlib` is used) is 20
#
if [[ "$result" == *.* ]]; then
# improve the output for decimal numbers
printf "$result" |
sed -e 's/^\./0./' `# add "0" for cases like ".5"` \
@saki007ster
saki007ster / designer.html
Last active August 29, 2015 14:13
designer
<link rel="import" href="../topeka-elements/topeka-datasource.html">
<link rel="import" href="../topeka-elements/category-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../topeka-elements/avatars.html">
<polymer-element name="my-element">
<template>
<style>
:host {