(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
commands: | |
01cacheClear: | |
command: rm -rf ~/.composer | |
02updateComposer: | |
command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update 1.0.0-alpha11 | |
03globalrequired: | |
command: export COMPOSER_HOME=/root && /usr/bin/composer.phar global require fxp/composer-asset-plugin:1.1.3 | |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
File > New > Project...
Create a Package.swift
file in your root project directory, add dependencies, then run swift package fetch
on the command line in the same directory. We’re not going to run swift build
because it will just complain.
So, you love Slack, but you hate applications with large white backgrounds? Why not use Dark Mode!
Unfortunately, Slack does not have a Dark Mode, although it's on their list of possibilities.
But, don't fret - there is a solution! Because the slack native desktop apps are just wrappers around a web app, we can inject our own CSS to customize the application to our liking.
#!/bin/bash | |
# -*- coding: UTF8 -*- | |
## | |
# Drush usual commands cheat sheet | |
# Prerequisites : drush installed | |
# | |
# Sources: | |
# http://drushcommands.com/ | |
# http://highrockmedia.com/blog/features-drush-drupal-goodness |
This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).
Matrix multiplication is a mathematical operation that defines the product of
import com.squareup.moshi.* | |
import java.lang.reflect.ParameterizedType | |
import java.lang.reflect.Type | |
object PairAdapterFactory : JsonAdapter.Factory { | |
override fun create(type: Type, annotations: MutableSet<out Annotation>, moshi: Moshi): JsonAdapter<*>? { | |
if (type !is ParameterizedType) { |
Laravel has a powerful Inversion of Control (IoC) / Dependency Injection (DI) Container. Unfortunately the official documentation doesn't cover all of the available functionality, so I decided to experiment with it and document it for myself. The following is based on Laravel 5.4.26 - other versions may vary.
I won't attempt to explain the principles behind DI / IoC here - if you're not familiar with them you might want to read What is Dependency Injection? by Fabien Potencier (creator of the Symfony framework).
alias deploy="git pull origin master && composer install && php artisan cache:clear && php artisan config:clear && php artisan debugbar:clear && php artisan route:clear && php artisan view:clear && sudo chmod 777 -R storage/ && php artisan config:cache && php artisan route:cache" | |
alias a='axel -a -n 8' | |
alias dt='axel -a -o ~/Downloads/test "http://speed.hetzner.de/1GB.bin"' | |
alias dtr='rm ~/Downloads/test*' | |
alias c='cd ~/www' | |
alias ll='ls -al' | |
alias ch='sudo chmod -R 777 .' | |
alias chweb='sudo chown -R kossa:http . && sudo find . -type d -exec chmod 755 {} + && sudo find . -type f -exec chmod 644 {} +' | |
alias g='guard' |
# xcode-build-bump.sh | |
# @desc Auto-increment the build number every time the project is run. | |
# @usage | |
# 1. Select: your Target in Xcode | |
# 2. Select: Build Phases Tab | |
# 3. Select: Add Build Phase -> Add Run Script | |
# 4. Paste code below in to new "Run Script" section | |
# 5. Drag the "Run Script" below "Link Binaries With Libraries" | |
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0) |