Skip to content

Instantly share code, notes, and snippets.

View alexaivars's full-sized avatar

Alexander Aivars alexaivars

  • Aivars AB
  • Sweden
View GitHub Profile
@AndrejGajdos
AndrejGajdos / webpack.config.js
Last active September 3, 2018 00:40
A sample project to demonstrate bundling ES6, React, SASS and Bootstrap with Webpack (http://andrejgajdos.com/setting-up-webpack-for-es6-react-sass-and-bootstrap/)
var webpack = require('webpack');
var merge = require('webpack-merge');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var NpmInstallPlugin = require('npm-install-webpack-plugin');
var autoprefixer = require('autoprefixer');
const TARGET = process.env.npm_lifecycle_event;
console.log("target event is " + TARGET);
var common = {
@kimmobrunfeldt
kimmobrunfeldt / 0-osx-for-web-development.md
Last active July 26, 2022 13:30
Install web development tools to Mavericks (OS X 10.9)

Install web development tools to Mavericks (OS X 10.9)

Strongly opinionated set of guides to quickly setup OS X Mavericks for web development. By default OS X hides stuff that normal people don't need to see. These settings are better defaults for developers.

I don't want: any sounds, annoying confirmation dialogs, hidden extensions, superflous animations, unnecessary things running like Dashboard, Notification center or Dock(Alfred/spotlight works better for me).

These are my opinions. Read this document through and pick up the good parts to your preferences.

System preferences

@ryanflorence
ryanflorence / leaderboard.js
Created April 11, 2012 17:21
Meteor.js Leader board example and some initial thoughts
// Set up a collection to contain player information. On the server,
// it is backed by a MongoDB collection named "players."
Players = new Meteor.Collection("players");
if (Meteor.is_client) {
Template.leaderboard.players = function () {
return Players.find({}, {sort: {score: -1, name: 1}});
};
@jpwright
jpwright / csstwitterbutton.html
Created April 8, 2012 20:52
CSS Twitter Button
<!-- This mimics the official tweet buttons that Twitter provides, without using JavaScript. This is useful for certain web applications, and for emails. See https://twitter.com/about/resources/buttons -->
<style type="text/css">
.tweetbutton {
inherit: none;
height: 16px;
display: inline-block;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
@saetia
saetia / gist:1623487
Last active May 1, 2024 19:55
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@chriseppstein
chriseppstein / 0_selector_hacks.scss
Created September 14, 2011 04:27
This gist demonstrates some uses of the new sass feature: Passing content blocks to mixins.
@mixin ie6 { * html & { @content } }
#logo {
background-image: url("/images/logo.png");
@include ie6 { background-image: url("/images/logo.gif"); }
}
@justinvoss
justinvoss / fabfile.py
Created June 20, 2011 16:05
Example Fabric and Cuisine Scrips
from deployment.cuisine import *
from fabric.api import *
from fabric.context_managers import *
from fabric.utils import puts
from fabric.colors import red, green
import simplejson
import os
@markupboy
markupboy / html5video.sh
Created February 8, 2011 15:43
automated conversion of a file to all three html5 compatible video formats - h.264, ogg, and webm
#!/bin/sh
####################################
# Output file for HTML5 video #
# Requirements: #
# - handbrakecli #
# - ffmpeg #
# - ffmpeg2theora #
# #
# usage: #
var Thing;
var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) {
for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; }
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor;
child.__super__ = parent.prototype;
return child;
};
Thing = (function() {
require 'rake/clean'
HAML = FileList['**/*.haml']
LESS = FileList['**/*.less']
COFFEE = FileList['**/*.coffee']
HTML = HAML.ext('html')
CSS = LESS.ext('css')
JS = COFFEE.ext('js')