Skip to content

Instantly share code, notes, and snippets.

Paweł Kowalski pavelloz

  • Earth, Milky Way
Block or report user

Report or block pavelloz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:5da319b57296c31874ea
window._eventLog = (function(longTime, important) {
var eventLog = [];
eventLog.getLongEvents = function(time) {
time = time === undefined ? longTime : time;
return this.filter(function(el) {
return el.time > time;
})
}
// Should we filter mousemove?
@averyvery
averyvery / application.rb
Last active Mar 20, 2019
Inline CSS or JS in Rails
View application.rb
config.assets.precompile += [
# precompile any CSS or JS file that doesn't start with _
/(^inline[^_\/]|\/[^_])[^\/]*.(js|css)$/,
...
@scotthorn
scotthorn / viewport-shots.js
Last active Nov 12, 2018
Nightwatch.js script for taking screenshots of a given URL at various browser widths.
View viewport-shots.js
/*
* Takes provided URL passed as argument and make full height screenshots of this page
* with several viewport widths using Nightwatch.js with Selenium.
*
* These viewport widths are taken from common android and iOS devices. Modify as needed.
*
* Takes an optional second argument for the path where screenshots are saved.
*
* Usage:
* $ nightwatch -t viewport-shots.js http://example.com
@jacrook
jacrook / font_variables.scss
Last active Mar 3, 2019
Sass Css Font Stack Variables
View font_variables.scss
//////////////////////////////////////////////////////////////
// Font Variables (http://cssfontstack.com/)
//////////////////////////////////////////////////////////////
//
// Serif font-stacks
//
$baskerville-font-stack: "Big Caslon", "Book Antiqua", "Palatino Linotype", Georgia, serif !default;
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active Jun 21, 2019
A badass list of frontend development resources I collected over time.
View frontendDevlopmentBookmarks.md
@SlexAxton
SlexAxton / .zshrc
Last active Jun 16, 2019
My gif workflow
View .zshrc
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else
@n1k0
n1k0 / 404checker.js
Created Jan 11, 2013
A CasperJS script to check for 404 & 500 internal links on a given website
View 404checker.js
/**
* This casper scipt checks for 404 internal links for a given root url.
*
* Usage:
*
* $ casperjs 404checker.js http://mysite.tld/
* $ casperjs 404checker.js http://mysite.tld/ --max-depth=42
*/
/*global URI*/
@mikefowler
mikefowler / StartView.js.coffee
Created Dec 28, 2012
Defining RequireJS modules + Coffeescript classes with the RequireJS sugar syntax. More detail here: http://requirejs.org/docs/whyamd.html#sugar
View StartView.js.coffee
define (require) ->
$ = require 'jquery'
_ = require 'underscore'
Backbone = require 'backbone'
Handlebars = require 'handlebars'
View = require 'lib/view'
startTemplate = require 'text!templates/start.html'
class StartView extends View
@zdennis
zdennis / config.rb
Created Jul 3, 2012
Make Middleman compile coffee-script using bare mode.
View config.rb
#
# Add the following to Middleman's config.rb:
#
CoffeeScript.class_eval do
class << self
def compile_with_bare(*args)
options = args.pop if args.last.is_a?(Hash)
(options ||= {})[:bare] = true
args << options
@gudbergur
gudbergur / README.markdown
Created Feb 19, 2012
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things
View README.markdown

This is a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

For example, process typeahead list asynchronously and return objects

  # This example does an AJAX lookup and is in CoffeeScript
  $('.typeahead').typeahead(
    # source can be a function
    source: (typeahead, query) ->
      # this function receives the typeahead object and the query string
You can’t perform that action at this time.