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
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
sudo apt-get update | |
sudo apt-get install g++-5 | |
sudo rm -f /usr/bin/gcc | |
sudo rm -f /usr/bin/g++ | |
sudo ln -s /usr/bin/gcc-5 /usr/bin/gcc | |
sudo ln -s /usr/bin/g++-5 /usr/bin/g++ |
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
# Installing a root/CA Certificate | |
# Given a CA certificate file foo.crt, follow these steps to install it on Ubuntu: | |
# Create a directory for extra CA certificates in /usr/share/ca-certificates: | |
sudo mkdir /usr/share/ca-certificates/extra | |
#Copy the CA .crt file to this directory: | |
sudo cp foo.crt /usr/share/ca-certificates/extra/foo.crt | |
#Let Ubuntu add the .crt file's path relative to /usr/share/ca-certificates to /etc/ca-certificates.conf: | |
sudo dpkg-reconfigure ca-certificates |
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
class TintColor { | |
constructor(_srcImage, _tintColor) { | |
this._srcImage = _srcImage; | |
this._tintColorArray = this._getRGBAArray(_tintColor); | |
} | |
setSourceImage(_srcImage) { | |
this._srcImage = _srcImage; | |
return this; | |
} | |
setTintColor(_tintColor) { |
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
# You can activate a network interface using: | |
ip link set <interface> up | |
Example: | |
ip link set enp0s3 up | |
# To deactivate it do: | |
ip link set <interface> down | |
Example: | |
ip link set enp0s3 down |
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
# Copying the /etc/netctl/examples/ethernet-dhcp example profile to /etc/netctl. | |
Interface=enp3s0 | |
Connection=ethernet | |
IP=dhcp |
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
/* | |
Copyright 2016 Google Inc. All Rights Reserved. | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software | |
distributed under the License is distributed on an "AS IS" BASIS, | |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and |
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
class NinePatch { | |
// New version | |
scaleImage(srcImg, newWidth, newHeight) { | |
return new Promise((resolve, reject) => { | |
// Load 9patch from background-image | |
this.bgImage = new Image(); | |
this.bgImage.crossOrigin = "Anonymous"; | |
this.bgImage.src = srcImg; | |
this.bgImage.onload = () => { |
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
//prefixes of implementation that we want to test | |
window.indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; | |
//prefixes of window.IDB objects | |
//IDBTransaction interface of the IndexedDB API provides a static, asynchronous transaction on a database using event handler attributes. | |
window.IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || window.msIDBTransaction; | |
window.IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange || window.msIDBKeyRange; | |
if (!window.indexedDB) { | |
window.alert("Your browser doesn't support a stable version of IndexedDB."); |
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
/* The padding and border are included in the total width and height of the elements. */ | |
* {box-sizing: border-box;} | |
/* Mobile first */ | |
/* Define width of col- */ | |
.gr-col-xs-1 {width: 8.33%;} | |
.gr-col-xs-2 {width: 16.66%;} | |
.gr-col-xs-3 {width: 25%;} | |
.gr-col-xs-4 {width: 33.33%;} | |
.gr-col-xs-5 {width: 41.66%;} |
OlderNewer