Skip to content

Instantly share code, notes, and snippets.

View solarsailer's full-sized avatar

Matthieu Oger solarsailer

View GitHub Profile
@solarsailer
solarsailer / README.md
Last active July 31, 2017 16:20
webpack configuration for Sass, Autoprefixer, CSS, CSS Modules and ES6+

Structure

📄 webpack.config.js
📄 package.json
📁 scripts/
  📄 manifest.js
  📄 index.js
📁 stylesheets/
 📄 main.scss
@solarsailer
solarsailer / open_iterm.applescript
Last active February 6, 2017 18:41
Open current Finder window in iTerm (for Finder toolbar usage)
on run
tell application "Finder"
try
set targetPath to (quoted form of POSIX path of (folder of the front window as alias))
on error
set targetPath to "~"
end try
end tell
my openTerminal(targetPath)
@solarsailer
solarsailer / globals.css
Last active December 6, 2016 10:48
CSS globals.
@charset "UTF-8";
/* ---------------------------------------------------------- *\
* # Globals
\* ---------------------------------------------------------- */
/**
* Box-model:
* 1. Change default box-model to border-box.
* 2. All elements will inherit from the <html> box-model.
@solarsailer
solarsailer / throwing.swift
Created July 8, 2016 20:47
Throwing functions
// Is there a reason to why the `throws` keyword is at this position:
func send() throws -> String {}
// Instead of…
throwing func send() -> String {}
// Like `mutating` is declared:
mutating func send() -> String {}
// To be consistant, throwing should be at the start of the declaration, right?
@solarsailer
solarsailer / Gemfile
Created March 15, 2016 20:53
Jekyll Autoprefixer
# ...
# Add this to your Gemfile:
gem 'autoprefixer-rails'
@solarsailer
solarsailer / ST3 User Bindings.json
Last active December 28, 2015 05:09
ST3 User Bindings
[
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" },
{ "keys": ["ctrl+tab"], "command": "next_view" }
]
@solarsailer
solarsailer / ogp.html
Created September 25, 2013 08:05 — forked from pathawks/meta.html
{% capture header %}
{% if page.title %}
<meta property="og:type" content="article" />
<meta property="og:title" content="{{ page.title }}" />
{% else %}
<meta property="og:type" content="website" />
{% endif %}
{% if site.title %}
// Add a border and a shadow to layer in Xamarin.iOS.
// View is a UIView subclass.
// Bottom border
var border = new CALayer();
border.Frame = new RectangleF(0, view.Frame.Height, view.Frame.Width, 1);
border.BackgroundColor = UIColor.Black.CGColor;
// Bottom gradient
var gradient = new CAGradientLayer();
@solarsailer
solarsailer / template_base.cs
Created July 25, 2013 18:31
Base C# template
#region Members
#endregion
#region Constructors
#endregion
#region Methods
#endregion
#region Properties
@solarsailer
solarsailer / template_full.cs
Created July 25, 2013 18:30
Full C# template
#region Nested
#endregion
#region Static
#endregion
#region Constants
#endregion
#region Members