Skip to content

Instantly share code, notes, and snippets.

View ArunHub's full-sized avatar

Arun M ArunHub

View GitHub Profile
@ArunHub
ArunHub / another.css
Last active March 29, 2019 06:50
bootstrap hamburger menu for screw transformation
.navbar-toggle.expand .icon-bar:nth-child(4){
left: -25px;
opacity: 0;
}
.navbar-toggle.expand .icon-bar:nth-child(5){
left: 35px;
opacity: 0;
}
@ArunHub
ArunHub / chrome.bat
Created March 29, 2019 06:07
Disable same origin policy in Chrome
Run below command by pressing (Windows key + R key)
chrome.exe --user-data-dir="C:/Chrome dev session" --disable-web-security
Reference: https://stackoverflow.com/questions/3102819/disable-same-origin-policy-in-chrome
@ArunHub
ArunHub / npm.md
Last active March 28, 2019 15:11
npm commands
  • To run a file from folder:
    • for example: I want run a gulpfile.js as index.js in tasks folder from root directory

      npm command: gulp --gulpfile tasks

      Here --gulpfile denotes gulpfile.js and searches it as index.js in tasks folder

Install $ npm install -g npm-check Use $ npm-check

<span class="screw"></span>
.screw {
position: absolute;
left: 50%;
width: 20px;
height: 20px;
background: #333 none repeat scroll 0% 0%;
border-radius: 50%;
border: 1px solid #ccc;
text-align: center;
@ArunHub
ArunHub / sublime shortcut keys
Last active March 28, 2019 14:49
Sublime text useful settings and shortcut keys
ctrl + r - to find css classes/IDs easily in a css file
ctrl + j - to align multiple lines into single line . mainly useful for single line css
ctrl + L - Select a line.
ctrl + D - Select a word/ duplicate a word or line(s)
ctrl + P - find any file on your project folder in fraction of second
ctrl + space - autocomplete for codes respectively
ctrl + / - comment purpose
ctrl + F - for normal search
ctrl + shift + F - Advanced search
ctrl + shift + G - wrap a text or codes
@ArunHub
ArunHub / sassfile.txt
Created March 28, 2019 14:47
sass imports in gulp problem
https://github.com/dlmanning/gulp-sass/issues/1
Right now if any of my sass files have an @import in them I get an error like this:
stream.js:94
throw er; // Unhandled stream error in pipe.
^
source string:1: error: file to import not found or unreadable: 'normalize'
@ArunHub
ArunHub / git.txt
Last active March 28, 2019 14:46
Git commands
git checkout -b develop
...make some changes...
...notice master has been updated...
...commit changes to develop...
git checkout master
git pull
...bring those changes back into develop...
@ArunHub
ArunHub / togglemoreless.js
Created March 27, 2019 06:31
toggle icons for more/less or advanced filter
function() {
$(this).hasClass("active") ?
($(this).removeClass("active"),
$(".fresh-widgets .icon-question").show(),
$(".fresh-widgets .icon-cross").hide())
:
($(this).addClass("active"),
$(".fresh-widgets .icon-question").hide(),
$(".fresh-widgets .icon-cross").show())
}
@ArunHub
ArunHub / css-extract.js
Created March 26, 2019 14:49
css extraction
function css(el) {
var sheets = document.styleSheets, ret = [];
el.matches = el.matches || el.webkitMatchesSelector || el.mozMatchesSelector
|| el.msMatchesSelector || el.oMatchesSelector;
for (var i in sheets) {
@ArunHub
ArunHub / main.js
Last active March 19, 2019 14:37
Create basic code for main.js, root component, vendor.ts and webpack files in react seed app
import React from "react";
import ReactDOM from "react-dom"
import RootComponent from "./app/RootComponent";
ReactDOM.render(
<RootComponent />,
document.getElementById('root')
);