[Server] GStreamer ---> HTML [Client]
- gstreamer-1.x
- Browser which supports video tag of HTML5
iex(2)> pid = spawn Traps, :init, [] | |
waiting to die... | |
#PID<0.92.0> | |
Nobody tried to kill me! ^_^ | |
waiting to die... | |
Nobody tried to kill me! ^_^ | |
waiting to die... | |
iex(3)> Process.exit pid, :normal | |
true | |
(⊙_⊙') somebody tried to kill me! {:EXIT, #PID<0.88.0>, :normal} |
#Inject javascript into HTML pages from console
An easy way to inject Javascripts into the current loaded dom using the developer console in chrome.
jQuery
var script = document.createElement('script');
script.src = 'http://code.jquery.com/jquery-1.7.2.min.js';
#!/bin/bash | |
set -x | |
# common shortcuts | |
git config --global alias.co checkout | |
git config --global alias.ci commit | |
git config --global alias.st status | |
git config --global alias.br branch | |
git config --global alias.rb rebase |
Gfx and glium are Rust libraries that aim to provide a "rusty" abstraction over graphics programming APIs. | |
Both may look similar, and one of the questions that gets asked frequently on IRC is "what are the differences between gfx and glium?". Here is a comparison table: | |
| Gfx | Glium | |
-------------------------------------|-------------------------------------------------------------------------------------------------------------------|-------------------------------- | |
URL | <https://github.com/gfx-rs/gfx-rs> | <https://github.com/tomaka/glium> | |
History | Papers since Oct 2013. Really started in June 2014. | Private/confidential from Feb 201 |
There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore
is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules
directory) as well as files that are generated (and regenerated) as artifacts of a build process.
All other files should be in your own global gitignore file:
.gitignore
in your home directory and add any filepath patterns you want to ignore.Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute
.config/git/ignore
for.gitignore
in your home directory, if you prefer.
# Controller option 1, implicit render selected based on format | |
defmodule MyApp.UserController do | |
use Phoenix.Controller | |
def show(conn, %{"id" => id}) do | |
render conn, :show, user: Repo.get(User, id) | |
end | |
end | |
# Controller option 2, explicit render with format pattern match |
#![feature(mpsc_select, box_syntax)] | |
use std::io; | |
use std::process::Command; | |
use std::sync::mpsc::{channel, Receiver, Select}; | |
use std::string::FromUtf8Error; | |
use std::thread::spawn; | |
#[derive(Debug)] | |
enum PipeError { |
Version numbers should be the ones you want. Here I do it with the last ones available at the moment of writing.
The simplest way to install elixir is using your package manager. Sadly, at the time of writing only Fedora shows
the intention to keep its packages up to date. There you can simply sudo dnf install erlang elixir
and you are good to go.
Anyway, if you intend to work with several versions of erlang or elixir at the same time, or you are tied to
a specific version, you will need to compile it yourself. Then asdf
is your best friend.
#!/bin/sh | |
# | |
# stunnel Start/Stop the stunnel daemons | |
# | |
# description: stunnel is a script that runs stunnel daemons | |
# version 1.00 | |
# | |
# chkconfig: 345 40 60 | |
# | |
# processname: stunnel |