Skip to content

Instantly share code, notes, and snippets.

View everdaniel's full-sized avatar
🏠
Working from home

Ever Daniel Barreto everdaniel

🏠
Working from home
View GitHub Profile
@everdaniel
everdaniel / certbot.sh
Created January 3, 2024 03:49 — forked from fideloper/certbot.sh
Certbot on Ubuntu, wildcard subdomains via CloudFlare DNS challenge
# Used on Ubuntu 18.04 and 20.04
# Find instructions for other OSes here: https://certbot.eff.org/instructions
# Install Certbot via Snaps
sudo snap install core; sudo snap refresh core
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
# Install DNS CloudFlare plugin
sudo snap set certbot trust-plugin-with-root=ok
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
@everdaniel
everdaniel / install_wrf41.sh
Created February 24, 2021 21:31 — forked from jamal919/install_wrf41.sh
WRF 4.1.2 installation with netCDF4, HDF5 in ubuntu 18.04 LTS
#!/bin/bash
## WRF installation with parallel process.
# Download and install required library and data files for WRF.
# License: LGPL
# Jamal Khan <jamal.khan@legos.obs-mip.fr>
# Tested in Ubuntu 18.04 LTS
# basic package managment
sudo apt update
sudo apt upgrade
@everdaniel
everdaniel / Highcharts Cheat Sheet.js
Created September 29, 2021 15:37 — forked from X-Raym/Highcharts Cheat Sheet.js
Highcharts Cheat Sheet
$('#container').highcharts({
chart: {
alignTicks: true, // When using multiple axis, the ticks of two or more opposite axes will automatically be aligned by adding ticks to the axis or axes with the least ticks.
animation: true, // Set the overall animation for all chart updating. Animation can be disabled throughout the chart by setting it to false here.
backgroundColor: '#FFF', // The background color or gradient for the outer chart area.
borderColor: '#4572A7', // The color of the outer chart border.
borderRadius: 5, // The corner radius of the outer chart border. In export, the radius defaults to 0. Defaults to 5.
borderWidth: 0, // The pixel width of the outer chart border.
className: null, // A CSS class name to apply to the charts container div, allowing unique CSS styling for each chart.
defaultSeriesType: 'line', // Alias of type.
@everdaniel
everdaniel / WRF_example.ipynb
Created August 6, 2016 14:49 — forked from darothen/WRF_example.ipynb
Simple WRF analysis/plotting examples
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@everdaniel
everdaniel / ex.js
Created January 21, 2016 00:41 — forked from JeffreyWay/ex.js
Laracasts.com Episode: Algolia + JavaScript + Vue
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Algolia with JS</title>
<link rel="stylesheet" href="app.css">
</head>
<body>
@everdaniel
everdaniel / jsonapi.md
Created December 10, 2013 03:03 — forked from wycats/jsonapi.md

JSON API

There are two JSON API styles:

  • The ID Style
  • The URL Style

The ID style is the easiest to get started with, but requires that your clients be able to guess the URLs for related documents. It also locks your API into a particular URL structure, which may become a problem as your API grows.

The URL style requires less guessing on the client side, and makes clients more resilient to API changes, but is trickier to use with relationships and compound documents.

<?php
/*
Plugin Name: Posts 2 Posts List Widget
Plugin URI: http://friendlywebconsulting.com/
Description: Creates a widget to display posts connected via the Posts 2 Posts plugin by Scribu, found here: http://wordpress.org/extend/plugins/posts-to-posts/
Author: Michelle McGinnis
Author URI: http://friendlywebconsulting.com/
Version: 1.0.0-alpha
*/
require 'fileutils'
start_time = Time.now
SOURCE_DB = {
:name => 'db_name',
:user => 'db_user',
:password => 'db_pass',
:host => 'localhost'
# MultIO Ruby IO multiplexer
# http://rcrowley.org/2010/07/27/multio-ruby-io-multiplexer.html
require 'stringio'
class MultIO < Array
def <<(io)
if io.respond_to?(:to_str)
io = StringIO.new(io)