- Go to Digital Ocean
- Create new droplet
- London
- Ubuntu
- No apps
- Add SSH keys
This file contains hidden or 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
extends Node | |
# Based on this tweet by Clay John: | |
# https://twitter.com/john_clayjohn/status/1306447928932753408 | |
func _ready() -> void: | |
# Create a local rendering device. | |
var rd := RenderingServer.create_local_rendering_device() | |
This file contains hidden or 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
/** | |
* !! NOTICE !! | |
* Instructions: https://alfredbaudisch.com/blog/gamedev/unreal-engine-ue/unreal-engine-actors-transparent-block-camera-occlusion-see-through/ | |
*/ | |
// OcclusionAwarePlayerController.cpp | |
// By Alfred Reinold Baudisch (https://github.com/alfredbaudisch) | |
#include "OcclusionAwarePlayerController.h" | |
#include "Kismet/GameplayStatics.h" |
This file contains hidden or 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
defmodule Company do | |
schema "companies" do | |
field(:name, :string) | |
field(:email, :string) | |
end | |
end | |
from(c in Company, where: c.name == "foo") | |
|> Repo.one() | |
|> (& &1.email).() |
This file contains hidden or 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
# To concat to lists, you normally do: | |
list = [1] | |
list ++ [2] | |
# result: [1, 2] | |
# How do you do that in pipelines? | |
# Global operators are under the Kernel module, so you can use them with the pipe operator. | |
list |> Kernel.++([2]) |
This file contains hidden or 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 | |
function v2_add() | |
-- foo.. | |
end | |
-- Vector | |
local vector = {} | |
local vector_meta = {} | |
function vector:new(x, y) |
This file contains hidden or 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
- Download Erlang source from http://www.erlang.org/download.html | |
- tar zxvf otp_src_18.2.1.tar.gz | |
- Configure for 32 bits (wxe_driver.so won't be generated for 64-bits): | |
- CFLAGS=-O0 ./configure --disable-hipe --enable-smp-support --enable-threads --enable-kernel-poll | |
- ./otp_build autoconf | |
- ./configure && make && sudo make install | |
- which erl | |
- Install Elixir | |
- iex | |
- :observer.start should finally work |
This file contains hidden or 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
/** | |
* Adapted to BR phone format from the class | |
* UsPhoneNumberFormatter by Samik Bandyopadhyay: | |
* http://stackoverflow.com/a/23659268/332839 | |
*/ | |
public class BrPhoneNumberFormatter implements TextWatcher { | |
final int MAX_LENGTH = 11; | |
//This TextWatcher sub-class formats entered numbers as (41) 1234(5)?-6789 |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>comment</key> | |
<string>Lua Syntax: version 0.8</string> | |
<key>fileTypes</key> | |
<array> | |
<string>lua</string> | |
</array> |
NewerOlder