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
{ | |
"lib/*.ex": { | |
"alternate": "test/{}_test.exs", | |
"type": "source" | |
}, | |
"test/*_test.exs": { | |
"alternate": "lib/{}.ex", | |
"type": "test" | |
} | |
} |
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
# See https://youtu.be/E315pukytFI?t=1251 | |
defmodule PidString do | |
def to_string(pid \\ self()) do | |
pid | |
|> :erlang.term_to_binary() | |
|> Base.encode64() | |
end | |
def to_pid(s) do | |
s |
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
--[[ | |
lvim is the global options object | |
Linters should be | |
filled in as strings with either | |
a global executable or a path to | |
an executable | |
]] | |
-- THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT |
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
package main | |
import ( | |
"fmt" | |
"os" | |
"os/signal" | |
"runtime" | |
"sync" | |
"syscall" | |
"time" |
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
call plug#begin('~/.config/nvim/plugged') | |
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } | |
Plug 'ycm-core/YouCompleteMe', { 'do': './install.py' } | |
Plug 'slashmili/alchemist.vim' | |
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } | |
Plug 'elixir-editors/vim-elixir' | |
Plug 'itchyny/lightline.vim' | |
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | |
Plug 'junegunn/fzf.vim' |
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
using UnityEngine; | |
namespace EnemyBehaviour | |
{ | |
public class Attack : IEnemyBehaviour | |
{ | |
public EnemyController EnemyCtrl | |
{ | |
get => mobile.m_EnemyController; | |
} |
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
function disco() { | |
function randomElement(arr) { | |
return arr[Math.floor(Math.random() * (arr.length - 1))]; | |
} | |
var blocks = Array.prototype.slice.call(document.querySelectorAll("#wallboard .build > .result")); | |
var colours = ["pink", "blue", "white", "purple", "grey", "red", "yellow"]; | |
var randomBlock = randomElement(blocks) | |
randomBlock.style.background = randomElement(colours); |
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
public String getMD5(String mobilePassword) throws NoSuchAlgorithmException { | |
MessageDigest md = MessageDigest.getInstance("MD5"); | |
String fullHash = mobilePassword + getDate(); | |
md.update(fullHash.getBytes()); | |
byte byteData[] = md.digest(); | |
StringBuffer hexString = new StringBuffer(); | |
for (int i=0;i<byteData.length;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
public class AuthHttpHandler { | |
private String URI_GET_AUTH = "http://melfridinbot.appspot.com/mobile/checkauth"; | |
protected void authRequest(String mobilePassword, String userEmail) throws NoSuchAlgorithmException, IOException { | |
HttpClient client = new DefaultHttpClient(); | |
HttpGet getRequest = new HttpGet(URI_GET_AUTH); | |
getRequest.addHeader("token", getMD5(mobilePassword)); | |
getRequest.addHeader("tokenDate", getDate()); |
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
public class EventAdd extends Fragment { | |
Date simpleDateFormat; | |
TextView dateText; | |
TextView timeText; | |
EditText locationText; | |
EditText nameText; | |
Button addEventBtn; | |
@Override | |
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { |
NewerOlder