Rails Models

Generating models

$ rails g model User


View webdriver.cs
using System;
using OpenQA.Selenium;
using OpenQA.Selenium.Edge;
using OpenQA.Selenium.Remote;
namespace EdgeDriverTests
public class Program

Links programação

Biblioteca com links sobre programação Web



  1. MDN | pt-BR
  2. DevDocs | EN
View hello_i386.s
# i386
# as -W -arch i386 -o hello_i386.o hello_i386.s
# ld -arch i386 -macosx_version_min 10.10 -o hello_i386 hello_i386.o -lSystem
.globl _main
View bin2iso.c
/* BIN2ISO (C) 2000 by DeXT
This is a very simple utility to convert a BIN image
(either RAW/2352 or Mode2/2336 format) to standard ISO format (2048 b/s).
Structure of images are as follows:
Mode 1 (2352): Sync (12), Address (3), Mode (1), Data (2048), ECC (288)
Mode 2 (2352): Sync (12), Address (3), Mode (1), Subheader (8), Data (2048), ECC (280)
Mode 2 (2336): Subheader (8), Data (2048), ECC (280)
Mode 2 / 2336 is the same as Mode 2 / 2352 but without header (sync+addr+mode)
View gist:5b876d9c5eea4c9e411c
import AVFoundation
import Foundation
// The maximum number of audio buffers in flight. Setting to two allows one
// buffer to be played while the next is being written.
private let kInFlightAudioBuffers: Int = 2
// The number of audio samples per buffer. A lower value reduces latency for
// changes but requires more processing but increases the risk of being unable
// to fill the buffers in time. A setting of 1024 represents about 23ms of
View ex1-prototype-style.js
function Foo(who) { = who;
Foo.prototype.identify = function() {
return "I am " +;
function Bar(who) {,"Bar:" + who);
# Credits to fuckbecauseican5 from
# Adapted to work with the official image available into Mac App Store
# Enjoy!
hdiutil attach /Applications/Install\ macOS\ -noverify -nobrowse -mountpoint /Volumes/install_app
hdiutil create -o /tmp/Sierra.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/Sierra.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build
View gist:8172796
  1. General Background and Overview
View hero.ts
import * as mongoose from 'mongoose';
export let Schema = mongoose.Schema;
export let ObjectId = mongoose.Schema.Types.ObjectId;
export let Mixed = mongoose.Schema.Types.Mixed;
export interface IHeroModel extends mongoose.Document {
name: string;
power: string;