Skip to content

Instantly share code, notes, and snippets.

@SomeKay
SomeKay / keybase.md
Created July 28, 2018 19:19
keybase.md

Keybase proof

I hereby claim:

  • I am bojzi on github.
  • I am bojzi (https://keybase.io/bojzi) on keybase.
  • I have a public key ASB0myVygyBNwbYn6iKCAfwj8V7zyslpxID4z9aVtpfPYwo

To claim this, I am signing this object:

@SomeKay
SomeKay / ambient.ts
Created August 24, 2016 12:18
Ambient declaration
declare var someVariable:any;
someVariable.doSomething(); // compiler won't make problems here
@SomeKay
SomeKay / ng-deploy.sh
Created August 24, 2016 11:53
ng deploy
ng github-pages:deploy
@SomeKay
SomeKay / angular-cli.sh
Created August 24, 2016 11:52
Angular CLI
npm install -g angular-cli
ng new my-angular-application
cd my-angular-application
ng serve
@SomeKay
SomeKay / package.json
Created August 20, 2016 09:33
Package.json in CSS repository
{
"name": "blog-css-architecture",
"version": "1.0.0",
"description": "Main project for the CSS architecture blog",
"scripts": {
"build": "node-sass styles.scss styles.css"
},
"author": "Kristian Poslek <kristian.poslek@gmail.com>",
"license": "MIT",
"devDependencies": {
@SomeKay
SomeKay / styles.scss
Created August 20, 2016 09:33
Updated imports
@import "submodules/bootstrap/assets/stylesheets/bootstrap";
$almostBlack: #333;
html, body {
background-color: $almostBlack;
color: $gray-light;
}
@SomeKay
SomeKay / pulling-out-css-dependency.sh
Created August 20, 2016 09:24
Pulling out CSS dependency
// Pull the dependency out into a submodule
cd submodules/styles
git submodule add https://github.com/comsysto/blog-css-architecture-css-dependency submodules/bootstrap
mv bootstrap-sass-master/* submodules/bootstrap
rm -rf bootstrap-sass-master
cd submodules/bootstrap
git add .
git commit -m "pulled out CSS dependency"
git push
// Update your CSS repository with the new reference
@SomeKay
SomeKay / package.json
Created August 20, 2016 09:08
Modified package.json with CSS pulling
{
...
"main": "index.js",
"scripts": {
"start": "node server.js",
"build": "node-sass --include-path styles styles/styles.scss styles/styles.css",
"getCss": "cp submodules/styles/styles.css styles/styles.css"
}
...
}
@SomeKay
SomeKay / pulling-out-css-2.sh
Created August 20, 2016 09:00
Pulling out CSS sources 2
cd submodules/styles
git add .
git commit -m "pulling out source css"
git push
cd ..
cd ..
git add .
git commit -m "pulled out source css"
git push
@SomeKay
SomeKay / css-submodule.sh
Created August 20, 2016 08:56
Pulling out CSS sources
mkdir submodules
git submodule add https://github.com/comsysto/blog-css-architecture-css-repository submodules/styles
mv styles/* submodules/styles
rm styles