Skip to content

Instantly share code, notes, and snippets.

View eivindml's full-sized avatar
🌱
Developing a new macOS app.

Eivind Lindbråten eivindml

🌱
Developing a new macOS app.
View GitHub Profile
@TorbenKoehn
TorbenKoehn / gulpfile.js
Created October 28, 2016 10:27
An example gulpfile.js to use Tale Jade with WordPress (or similar template engines)
var gulp = require('gulp'),
exec = require('gulp-exec');
var templateFiles = [
'wp-content/themes/my-theme/index.jade',
'wp-content/themes/my-theme/page.jade',
'wp-content/themes/my-theme/page-single.jade',
'wp-content/themes/my-theme/archive.jade',
//All other template files
@MikeAM
MikeAM / baseline-grid.scss
Last active May 12, 2017 17:58
Pure-CSS baseline grid with easily-customizable column count and baseline size (using Sass). No more uploading background images!
/* Sass Mixin that generates a Baseline Grid */
/* by: Mike Morrison, Soholaunch.com */
/* You don't have to leave this credit comment in, but it would be nice of you. */
// Set your grid dimensions here
$body-width: 960px;
$baseline: 22px;
@mixin baseline-grid {
$columns: 16;
$column-color: rgba(200,0,0,.2);
@eivindml
eivindml / grid.sass
Created May 14, 2017 08:48
Minimalist CSS grid, using new CSS grid property. 🏁 Check compatibility before use.
.l-wrap
width: 100%
max-width: 1196px
margin: 0 auto
.l-grid
display: grid
grid-gap: 52px
grid-template-columns: repeat(6, 1fr)
@eivindml
eivindml / scntool.md
Created November 12, 2018 11:57 — forked from matux/scntool.md
SceneKit scntool command line options
$ xcrun scntool --verbose
| Current SceneKit version is 4.560000
| Running scntool (compiled on Jul  1 2018 01:01:55)

usage: scntool --convert file --format format [--output file]
000084a8:  7363 7269 7074 696f 6e00 2d2d 7461 7267 6574 2d70 6c61 7466  :scription.--target-platf
@cdmcmahon
cdmcmahon / PointFreeStateManagement.swift
Last active November 6, 2019 23:51
In the Point-Free series on application architecture and state management, they define a series of ways to compose reducers. Sometimes, however, it seems that the signature of reducers can complicate the signature of these different compositions. I found creating a typealias for reducers separated the concern of understanding the concept of redu…
// In the Point-Free series on application architecture and state management,
// they define a series of ways to compose reducers. Sometimes, however, it seems
// that the signature of reducers can complicate the signature of these different
// compositions. I found creating a typealias for reducers separated the concern of
// understanding the concept of reducers and understanding their higher order
// constructions, especially when starting to write my own.
// Adding a typealias for Reducer can make certain parts a bit more readable
typealias Reducer<Value, Action> = (inout Value, Action) -> Void
@simonliotier
simonliotier / SwiftUI+CustomFonts+DynamicType.swift
Last active December 11, 2019 14:27
Example of how to get Dynamic Type with custom fonts in SwiftUI
import SwiftUI
/// Example of how to get Dynamic Type with custom fonts in SwiftUI.
struct ContentView: View {
var body: some View {
VStack(spacing: 20) {
Text("A large title").customFont(.largeTitle) // "Optima-ExtraBlack", 28
Text("A body").customFont(.body) // "Kailasa", 16
Text("A caption").customFont(.caption2) // "IowanOldStyle-Italic", 11
}
diff --git a/0084-testable-state-management-ergonomics/PrimeTime/ComposableArchitecture/ComposableArchitecture.swift b/0084-testable-state-management-ergonomics/PrimeTime/ComposableArchitecture/ComposableArchitecture.swift
index db4ab12..ab96c5f 100644
--- a/0084-testable-state-management-ergonomics/PrimeTime/ComposableArchitecture/ComposableArchitecture.swift
+++ b/0084-testable-state-management-ergonomics/PrimeTime/ComposableArchitecture/ComposableArchitecture.swift
@@ -128,3 +128,24 @@ public func logging<Value, Action>(
}] + effects
}
}
+
+
@oviniciusfeitosa
oviniciusfeitosa / Docker - Replacing Apache DocumentRoot using `sed`.md
Created September 12, 2017 22:02
Docker - Replacing Apache DocumentRoot using `sed`.
   ENV APACHE_DOCUMENT_ROOT /var/www/mapasculturais/src

   RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
   RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
@TheSwiftyCoder
TheSwiftyCoder / userDeviceChangeObserver.swift
Created January 24, 2017 13:39
Swift 3 Handling user device change
// Creates the notifcation constant
let notification = Notification.Name("NSSystemClockDidChangeNotification")
// Add this within your viewDidLoad()
NotificationCenter.default.addObserver(self, selector: #selector(handleTimeChange), name: notification, object: nil)
// Place this within the view controller where the above is added
@objc private func handleTimeChange() {
// Add anything you need in here
NotificationCenter.default.removeObserver(self, name: notification, object: nil);
@marcedwards
marcedwards / cubesanddiamonds.pde
Last active October 25, 2021 06:40
Cubes and diamonds
//
// Cubes and diamonds.
// Created using Processing 3.5.3.
//
// Code by @marcedwards from @bjango.
//
// A GIF of this code can be seen here:
// https://twitter.com/marcedwards/status/1167765622899347459
//