Skip to content

Instantly share code, notes, and snippets.

defmodule EveryColor.ColorSocketTest do
use EveryColor.ChannelCase
alias EveryColor.DistributionChannel
test "Joins and receives a color" do
{:ok, _, socket} =
socket("user_id", %{some: :assign})
|> subscribe_and_join(DistributionChannel, "colors")
@Hajto
Hajto / dump
Created October 30, 2016 17:34
......
1) test Joins and receives a color (EveryColor.ColorSocketTest)
test/channels/color_socket_test.exs:6
No message matching %Phoenix.Socket.Reply{ref: ^ref, status: :ok, payload: %{color: _}} after 100ms.
The following variables were pinned:
ref = %Phoenix.Socket{assigns: %{some: :assign}, channel: EveryColor.DistributionChannel, channel_pid: #PID<0.829.0>, endpoint: EveryColor.Endpoint, handler: nil, id: "user_id", joined: true, pubsub_server: EveryColor.PubSub, ref: nil, serializer: Phoenix.ChannelTest.NoopSerializer, topic: "colors", transport: Phoenix.ChannelTest, transport_name: :channel_test, transport_pid: #PID<0.827.0>}
Process mailbox:
%Phoenix.Socket.Message{event: "color_generated", payload: %{color: 0}, ref: nil, topic: "colors"}
stacktrace:
#include <stdlib.h>
#include <stdio.h>
#define NUM_POINTS 5
#define NUM_COMMANDS 2
int main()
{
char * commandsForGnuplot[] = {"set title \"TITLEEEEE\"", "plot 'data.temp'"};
double xvals[NUM_POINTS] = {1.2, 2.0, 3.0, 4.0, 4.5};
double yvals[NUM_POINTS] = {4.8 ,3.0, 1.0, 3.0, 3.23};
#include <stdlib.h>
#include <stdio.h>
#define NUM_POINTS 5
#define NUM_COMMANDS 2
int main()
{
//To ci potrzebne se przepisz
char * commandsForGnuplot[] = {"set title \"TITLEEEEE\"", "plot 'data.temp'"};
#include<stdio.h>
#include<math.h>
int main() {
//Serio kurwa? Wiesz ze nie musisz uzywać jednoliterowych zmiennych? Wiesz ze mozesz napisac x_1, albo pierwszy_pierwiastek?
double a, b, c, d, x, z, p, q;
do {
printf("Podaj wartosc a: \n ");
@Hajto
Hajto / deps.sh
Last active November 18, 2016 13:35
Hajto Manjaro setup
sudo pacman -S elixir scala vagrant postgresql mongodb emacs docker nodejs npm
sudo npm install -g yarn gulp bower
yaourt --noconfirm android-studio
yaourt --noconfirm synaptics
yaourt --noconfirm virtualbox
@Hajto
Hajto / Yeril.c
Last active November 29, 2016 13:45
#include <stdio.h>
#include <stdlib.h>
#include<math.h>
int NWD(int x, int y) {
int z;
while (y != 0) {
z = x % y;
x = y;
y = z;
defmodule Kpsz.Event do
use Kpsz.Web, :model
schema "events" do
field :name, :string
field :description, :string
field :location, Kpsz.Point
has_many :pressences, Kpsz.Pressence
timestamps()
defmodule Kpsz.Data.Event do
alias Kpsz.Event
alias Kpsz.Repo
def create(event, repo \\ Repo) do
changeset = Event.changeset(%Kpsz.Event{}, event)
repo.insert(changeset)
end
package com.example.wk.projektkoncowywiolettakurek.Classes;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.os.AsyncTask;
import android.util.Log;
import com.example.wk.projektkoncowywiolettakurek.Collages.CollageActivity;