Skip to content

Instantly share code, notes, and snippets.

@mjacobus
mjacobus / ruby.rb
Last active November 27, 2015 08:21
# ruby vs crystal
#
# ruby file.rb > /tmp/output.log => 2.14 seconds
# crystal run file.cr > /tmp/output.log => 7.03 seconds
# ./file > /tmp/output.log => 6.88 seconds
class TestHash
def create(data)
Hash.new(data)
end

Scientist Craig Venter creates life for first time in laboratory sparking debate about 'playing god'

Source: the original report

Dr Craig Venter, a MULTI-MILLIONAIRE PIONEER IN GENETICS, AND HIS TEAM HAVE MANAGED to make a completely new "synthetic" life form from a mix of chemicals.

They manufactured a new chromosome from artificial DNA in a test tube, then TRANSFERRED IT INTO AN EMPTY CELL and watched it multiply – the very definition of being alive.

The man-made single cell "creature", which is a MODIFIED VERSION OF ONE OF THE SIMPLEST BACTERIA ON EARTH, proves that the technology works.

var lunrSpy = jasmine.crateSpy()
jobsService(asdasd, lunrSpy)
var callback = lunrSpy.calls.mostRecent().args[0];
var myMockedContext = {
field: jasmine.createSpy()
};
composer require league/flysystem-aws-s3-v3
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Using version ^1.0 for league/flysystem-aws-s3-v3
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package jakoch/phantomjs-installer == 1.9.8.0 could not be found.
module.exports = function(grunt) {
var cssPath = 'public/wp-content/themes/ggs-rcw/css';
var sassPath = 'public/wp-content/themes/ggs-rcw/resources/scss';
var jsPath = 'public/wp-content/themes/ggs-rcw/js';
var css = function (file) {
return cssPath + "/" + file;
};
  • Renomear/deletar/duplicar arquivo atual ( ex: só apertar cmd+ctrl+p e escrever rename, que ele ja me joga para um box para escrever o nome do arquivo)

    Instala (este)[https://github.com/tpope/vim-eunuch] plugin.

" % + tab expande para o caminho completo
:Move new_path
:Rename newName
:Remove

Vim tips

  • set omnifunc=syntaxcomplete#Complete - source
  • ctags --file-scope=no -R --languages=erlang - source

Learn docker

Docker commands

  • docker build -t image/name . - Creates an image

  • docker run -d -p 80:80 image/name Run a new "instance" of the image exposing local port 80 with container port 80

#!/usr/bin/env bash
# https://kkovacs.eu/cool-but-obscure-unix-tools
# https://stedolan.github.io/jq/
# https://github.com/jkbrzt/httpie
function install {
local package=$1
command -v apt > /dev/null 2>&1
<?php
namespace Php7Features;
interface Stringable
{
// scalar return type
public function toString() : string;
}