Skip to content

Instantly share code, notes, and snippets.

@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
#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 ");
#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 <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};
@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:
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")
defmodule Kpsz.Point do
@behaviour Ecto.Type
@moduledoc """
Representation of geological point in the database
"""
defmodule State do
defstruct x: 0, y: 0
end
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define IT_COUNT 1001
//tablicowanie fcji sin w <a,b> - szereg + fcja biblioteczna
//definicja funkcji szereg x - parametr formalny
double szereg_rek(double x, double it){
if( it >= IT_COUNT)
return x;
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
//Wersja L
int main(){
int** matrix;
int width = 0;
int counter = 0;
defmodule Kpsz.PressenceController do
use Kpsz.Web, :controller
alias Kpsz.Event
alias Kpsz.User
alias Kpsz.Pressence
def assign(conn, %{
"event" => event,
"user" => user}) do