A list of all not symbols and notations of elixir. Tried to have a base for comparision for other programming languages.
- === (strict)
- !== (strict)
- == (relaxed)
# This is our struct with some fields. | |
defmodule User do | |
defstruct name: "julius", role: :user | |
end | |
defmodule UserManager do | |
# Matching on %User{} will ensure we will get a user. |
<?php | |
// ID of gallery, you get it from URL. | |
$galleryId = 'nuAM3'; | |
$url = 'http://imgur.com/ajaxalbums/getimages/'.$galleryId.'/hit.json?all=true'; | |
$jsonContent = file_get_contents($url); |
# Install a Webserver | |
apt-get -y install apache2 | |
# Target docroot to /home/satis/web/ | |
# Install PHP5 CLI and needed programs. | |
apt-get -y install php5-cli php5-curl php5-json git wget | |
# Add a specifix user for our task | |
adduser satis |
# Source: https://askubuntu.com/questions/912498/tl-wn722n-is-not-recognized | |
sudo apt-get install git dkms git make build-essential | |
cd /usr/src | |
sudo git clone https://github.com/lwfinger/rtl8188eu.git | |
sudo dkms add ./rtl8188eu | |
sudo dkms build 8188eu/1.0 | |
sudo dkms install 8188eu/1.0 | |
sudo modprobe 8188eu |
# Create a new Token | |
curl -u 'githubuser' -d '{"note":"Your Application"}' https://api.github.com/authorizations | |
# It is: "ebab4dc37e654bb230a9c69ebcd5f38e9a81e210" | |
#{ | |
# "created_at": "2013-01-04T18:00:28Z", | |
# "app": { | |
# "url": "http://developer.github.com/v3/oauth/#oauth-authorizations-api", |
# | |
# Ubuntu 22.04 (Jammy Jellyfish) | |
# | |
# Basic packages i usually install. | |
# | |
# Author: Julius Beckmann <github@h4cc.de> | |
# | |
# Upgraded Script from 18.04: https://gist.github.com/h4cc/c54d3944cb555f32ffdf25a5fa1f2602 | |
# Upgraded Script from 17.04: https://gist.github.com/h4cc/09b7fe843bb737c8039ac62d831f244e |
<?php | |
/** | |
* @author Julius Beckmann <github@h4cc.de> | |
* @license MIT (http://opensource.org/licenses/MIT) | |
*/ | |
/** | |
* Adds expected items to a mocked Iterator. | |
*/ | |
function mockIteratorItems(\Iterator $iterator, array $items, $includeCallsToKey = false) |
<?php | |
namespace Acme\DemoBundle\Routing\Generator; | |
use Symfony\Component\Routing\Generator\UrlGenerator as BaseUrlGenerator; | |
class UrlGenerator extends BaseUrlGenerator | |
{ | |
protected function doGenerate($variables, $defaults, $requirements, $tokens, $parameters, $name, $referenceType, $hostTokens) | |
{ |