Skip to content

Instantly share code, notes, and snippets.

@tellodaniel
tellodaniel / model.rb
Last active November 17, 2022 21:18
Tello model cheatsheet
require 'rails_helper'
RSpec.describe Model, type: :model do
it { expect(described_class).to be < OtherModel }
describe 'associations' do
it { should belong_to(:carrier).optional }
it { should belong_to(:zip_code).with_foreign_key('geolocation_id').class_name('Geolocation') }
it { should have_one(:facility_procedure).required }
it { should have_many(:companies).through(:other_table) }
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ElectrocardiogramWatchAppInstallIsAllowed</key>
<true/>
<key>HKAtrialFibrillationDetectionOnboardingCompleted</key>
<integer>1</integer>
<key>HKElectrocardiogramOnboardingCompleted</key>
<integer>4</integer>
Configs
const tabBasedApp = (inbox, properties, contacts, profile) => {
navigation.setRoot({
root: {
bottomTabs: {
children: [
{
stack: {
options: bottomTabsOptions('inbox'),
@tellodaniel
tellodaniel / covid-19.exe
Created February 28, 2020 18:03
covid-19.exe
1 attaaaggtt tataccttcc caggtaacaa accaaccaac tttcgatctc ttgtagatct
61 gttctctaaa cgaactttaa aatctgtgtg gctgtcactc ggctgcatgc ttagtgcact
121 cacgcagtat aattaataac taattactgt cgttgacagg acacgagtaa ctcgtctatc
181 ttctgcaggc tgcttacggt ttcgtccgtg ttgcagccga tcatcagcac atctaggttt
241 cgtccgggtg tgaccgaaag gtaagatgga gagccttgtc cctggtttca acgagaaaac
301 acacgtccaa ctcagtttgc ctgttttaca ggttcgcgac gtgctcgtac gtggctttgg
361 agactccgtg gaggaggtct tatcagaggc acgtcaacat cttaaagatg gcacttgtgg
421 cttagtagaa gttgaaaaag gcgttttgcc tcaacttgaa cagccctatg tgttcatcaa
481 acgttcggat gctcgaactg cacctcatgg tcatgttatg gttgagctgg tagcagaact
541 cgaaggcatt cagtacggtc gtagtggtga gacacttggt gtccttgtcc ctcatgtggg
@tellodaniel
tellodaniel / 00_ssl.config
Last active August 23, 2017 00:20
AWS Elastic Beanstalk certbot .ebextensions
Content of ssl.pre is wrong! that configuration is for Nginx
Apache here!
You need to modify the next paths depending your conf:
# Make an Apache config file for SSL
files:
/etc/httpd/conf.d/ssl.pre:
mode: "000644"
@tellodaniel
tellodaniel / Sedema_A05601.json
Created January 29, 2016 01:58
Ejemplo de respuesta del servicio web de la Semovi
{
"vehicle": {
"id": 412,
"placa": "A05601",
"fechas_adeudo_tenecia": null,
"tiene_adeudo_tenencia": "0",
"created_at": "2016-01-29T00:29:13.447Z",
"updated_at": "2016-01-29T00:29:13.447Z"
},
"verifications": [