Send email asynchroniously using Sidekiq.
Create mailer class:
# app/mailers/user_mailer.rb
require "csv" | |
require "sqlite3" | |
if ARGV.length < 3 | |
puts "Uso: ruby create_db_from_csv.rb ruta/al/archivo.csv debugging.dashboard.db nombre_tabla" | |
exit | |
end | |
csv_file = ARGV[0] |
module SaysHi | |
def self.included(base) | |
base.extend ClassMethods | |
end | |
module ClassMethods | |
def hi_to | |
@hi_to ||= "" | |
end |
import Component from '@glimmer/component'; | |
import { action } from '@ember/object'; | |
import { tracked } from '@glimmer/tracking'; | |
import { inject as service } from '@ember/service'; | |
import * as Video from 'twilio-video/dist/twilio-video'; | |
import { attachTracks } from "../utils/intrati-twilio"; | |
export default class CreateRoomComponent extends Component { |
#!/bin/bash -xe | |
function byPosition () { | |
echo "Variable in position 1: $1" | |
echo "Variable in position 2: $2" | |
} | |
byPosition hola mundo |
<?php | |
// WordPress stores the site URL in the database by default (which I have never | |
// understood), and it's a pain to have to type out the UPDATE SQL or search in | |
// phpMyAdmin to change it. This is a simple way to put the URL into | |
// wp-config.php instead. | |
// Note that you will still need to update any URLs that appear in the content, | |
// especially when you copy a database from a development site to production: | |
// https://gist.github.com/davejamesmiller/a8733a3fbb17e0ff0fb5 |
#!/bin/bash -xe | |
# | |
# Deploy latest revision without going to the AWS web console (used for failed deployments) | |
# | |
# jq needs to be installed | |
# https://stedolan.github.io/jq/ | |
aws --region us-west-2 \ | |
deploy list-application-revisions \ | |
--application-name staging \ |
var https = require('https'); | |
var util = require('util'); | |
exports.handler = function(event, context){ | |
console.log(JSON.stringify(event, null, 2)); | |
console.log('From SNS:', event.Records[0].Sns.Message); | |
var postData = { | |
"channel": "#server-deploys", | |
"username": "AWS SNS via Lambda", |