- Install Sublime Text from here
- Install Xcode from the AppStore
- Open Xcode and accept the licence
- Install command line tools. From the terminal run:
xcode-select --install
- Install homebrew
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NSData+Base64.h | |
// base64 | |
// | |
// Created by Matt Gallagher on 2009/06/03. | |
// Copyright 2009 Matt Gallagher. All rights reserved. | |
// | |
// This software is provided 'as-is', without any express or implied | |
// warranty. In no event will the authors be held liable for any damages | |
// arising from the use of this software. Permission is granted to anyone to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARCHFLAGS="-arch x86_64" gem install mysql2 -- –with-mysql-config=/usr/local/bin/mysql_config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Maker Link by @levelsio --> | |
<!-- MIT License --> | |
<style> | |
body { | |
background:#333; | |
} | |
.levelsio-by { | |
font-family:"Helvetica Neue",sans-serif; | |
right:0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.7" | |
services: | |
pihole: | |
container_name: pihole | |
image: pihole/pihole:latest | |
dns: 127.0.0.1 | |
restart: unless-stopped | |
links: | |
- unbound |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8' /> | |
<title></title> | |
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> | |
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.18.0/mapbox-gl.js'></script> | |
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.18.0/mapbox-gl.css' rel='stylesheet' /> | |
<script src='https://api.mapbox.com/mapbox.js/plugins/turf/v2.0.2/turf.min.js'></script> | |
<style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def valid? version | |
pattern = /^\d+\.\d+\.\d+(\-(dev|beta|rc\d+))?$/ | |
raise "Tried to set invalid version: #{version}".red unless version =~ pattern | |
end | |
def correct_version version | |
ver, flag = version.split '-' | |
v = ver.split '.' | |
(0..2).each do |n| | |
v[n] = v[n].to_i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:math'; | |
import 'package:flutter/material.dart'; | |
MaterialColor generateMaterialColor(Color color) { | |
return MaterialColor(color.value, { | |
50: tintColor(color, 0.5), | |
100: tintColor(color, 0.4), | |
200: tintColor(color, 0.3), | |
300: tintColor(color, 0.2), | |
400: tintColor(color, 0.1), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'benchmark' | |
Benchmark.bm do |b| | |
n = 1_000_000 | |
value1 = 1 | |
value2 = nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Helpers for better embedding and manipulation of videos | |
# Place this code in app/helpers/videos_helper.rb | |
# Then from any view you can add: | |
# | |
# <%= get_video_iframe('http://the.video.url') %> | |
# | |
# Optionally you can add width and height. | |
# | |
# <%= get_video_iframe('http://the.video.url', '1600px', '900px') %> | |
# |
OlderNewer