Skip to content

Instantly share code, notes, and snippets.

View darlanmendonca's full-sized avatar

Darlan Mendonça darlanmendonca

View GitHub Profile
@darlanmendonca
darlanmendonca / karma.conf.js
Created June 2, 2017 20:10 — forked from frederickfogerty/karma.conf.js
Coverage + tests with webpack, babel, karma, mocha, and istanbul
var webpack = require('webpack')
module.exports = function (config) {
config.set({
browsers: [ 'Chrome' ], //run in Chrome
browserNoActivityTimeout: 60000,
singleRun: true, //just run once by default
frameworks: [ 'mocha' ], //use the mocha test framework
files: [
//'src/**/*.{jsx,js}',
const {JSDOM: Dom} = require('jsdom')
before(function () {
global.document = jsdom(`<!doctype html><html><body><div id="container"/></div></body></html>`)
global.window = document.defaultView
})
after(function () {
delete global.window
delete global.document
let server
before((done) => {
const app = express()
app.use('/', express.static(path.resolve(__dirname, '../../dist')))
server = app.listen(8080, done)
})
after(() => {
server.close()
})

~ variavel em terminal, q aponta para sua pasta d usuario

pwd - mostra o caminho completo d onde vc sta

pwd\\s\\s
/Users/darlanmendonca/projects
@darlanmendonca
darlanmendonca / webkit-pseudo-elements.md
Created August 25, 2016 17:37 — forked from leostratus/webkit-pseudo-elements.md
Webkit Pseudo-Element Selectors (Shadow DOM Elements)

An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.

Everything is broken up by tag, but within each the selectors aren't particularly ordered.

I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A

A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:

-webkit-appearance:none;

@darlanmendonca
darlanmendonca / node-and-npm-in-30-seconds.sh
Created July 18, 2016 20:22 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh

Integers

Type Min Max
Int8 -128 127
UInt8 0 255
Int16 -32.768 32.767
UInt16 0 65.535
Int32 -2.147.483.648 2.147.483.647
UInt32 0 4.294.967.295
- sidebar enhancements
- editorconfig
- material theme
- emmet
- status bar file size
- syntax highlights(less, sass, javascript next, ejs, pug)
- Markdown Extended https://github.com/jonschlinkert/sublime-markdown-extended
@darlanmendonca
darlanmendonca / gulpfile.js
Created April 28, 2016 14:06 — forked from jbarrus/gulpfile.js
protractor coverage support with gulp and istanbul (not tested, this is just extracted from larger files to demonstrate how to get protractor coverage working)
var istanbul = require('istanbul'),
gulp = require('gulp'),
istanbul = require('gulp-istanbul');
gulp.task('js', function() {
return gulp.src('js')
.pipe(istanbul({
includeUntested: true,
coverageVariable: '__coverage__'
}))
@darlanmendonca
darlanmendonca / gist:19172d9ecb4d1af15c9f
Created May 11, 2015 14:50
Browser Sync to any folder
npm install -g browser-sync
alias start="browser-sync start --server --files 'css/*.css, *.html, js/*.js'"