Navigation Menu

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
@fideloper
fideloper / certbot.sh
Last active April 18, 2024 14:43
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
@jamal919
jamal919 / install_wrf41.sh
Last active March 13, 2024 15:38
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
@slorber
slorber / react-navigation-tree.jsx
Last active August 13, 2022 19:17
react-navigation-tree.jsx
const App = createAppContainer(
createStack({
LoggedSwitch: createSwitch({
// When user is authenticated
LoggedIn: createStack({
// The logged in root is generally a tab or drawer navigator
LoggedInRoot: createTabsOrDrawer({
@blaylockbk
blaylockbk / download_GOES_AWS.py
Created August 30, 2019 17:31
View and download GOES data on AWS with s3fs
# Brian Blaylock
# Requres `s3fs`
# Website: https://s3fs.readthedocs.io/en/latest/
# In Anaconda, download via conda-forge.
import s3fs
# Use the anonymous credentials to access public data
fs = s3fs.S3FileSystem(anon=True)
@mpociot
mpociot / CanBeReplicated.php
Created June 12, 2019 12:32
Add the ability to replicate Laravel models to other models.
<?php
use Illuminate\Support\Arr;
trait CanBeReplicated
{
public function replicateTo(string $model, array $with = null, array $except = null)
{
$defaults = [
$this->getKeyName(),
@poing
poing / laravel_facades.md
Last active March 25, 2024 21:37
Laravel Facades

Understanding Facades in Laravel

What's a Facade?

The Laravel explination, shown below is confusing.

Facades provide a "static" interface to classes that are available in the application's service container. Laravel ships with many facades which provide access to almost all of Laravel's features. Laravel facades serve as "static proxies" to underlying classes in the service container, providing the benefit of a terse, expressive syntax while maintaining more testability and flexibility than traditional static methods.

Many examples use Cache::get('key') to demonstrate how a Facade works. Comparing the following code to the utility that a Facade provides.

@karlhillx
karlhillx / laravel-mix-font-awesome.md
Last active December 21, 2022 15:35
Want to use Laravel and Font Awesome? (Regularly updated)

Laravel Mix & Font Awesome Setup: Compiling Assets

This document provides help on getting your Laravel instance running with the latest versions of Laravel Mix and Font Awesome. Note: This guide is for Laravel versions 5 through 7. If you are using Laravel 8, please go here.

Laravel Mix
@majidalavizadeh
majidalavizadeh / Tabler_on_Laravel.md
Last active April 8, 2024 00:50
Use Tabler on laravel

This is a simple instruction to use Tabler in your next Laravel project.

(Tabler is a beautiful dashboard: https://tabler.io/)

How to install:

  1. first of all run content of gistfile1.txt in your Laravel project.
  2. Copy tabler.js to recourses/js.
  3. Copy tabler.scss to resources/sass.
  4. Replace webpack.mix.js with your current webpack.mix.js
@geek-at
geek-at / parse_austria.php
Last active November 1, 2022 03:02
Parsing ip data from a file
<?php
$infile = 'austria.csv';
$outfile = 'austria.ips';
$fp = fopen($outfile,'w');
$handle = fopen($infile, "r");
if ($handle)
{
while (($line = fgets($handle)) !== false) {
$line = trim($line);