Skip to content

Instantly share code, notes, and snippets.

View ff6347's full-sized avatar
🤖
updating status…

Fabian Morón Zirfas ff6347

🤖
updating status…
View GitHub Profile
@ff6347
ff6347 / wifi-on-ubuntu-server-18.md
Created April 9, 2020 13:14 — forked from austinjp/wifi-on-ubuntu-server-18.md
Enabling wifi on Ubuntu server 18

Wifi on Ubuntu 18 server

TLDR

  1. Install wpasupplicant
  2. Turn on wifi radios: sudo nmcli radio wifi on
  3. Check your devices are recognised even if they're not "managed": sudo iwconfig
  4. Check your wifi (here called "wlp3s0") is capable of detecting nearby routers: sudo iwlist wlp3s0 scan
  5. Configure netplan by dropping a file called 01-netcfg.yaml into /etc/netplan/ or edit existing file there. See example below.
  6. netplan try, netplan generate, netplan apply.
@ff6347
ff6347 / react-confirm.js
Created February 6, 2020 14:11 — forked from primaryobjects/react-confirm.js
A simple example of a confirm alert dialog in ReactJs / React.
<div className='delete-button' onClick={() => { if (window.confirm('Are you sure you wish to delete this item?')) this.onCancel(item) } } />
@ff6347
ff6347 / setup_rds_postgis.sql
Created June 24, 2019 12:17 — forked from matthewberryman/setup_rds_postgis.sql
Setup postgis in Amazon RDS
-- taken from http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.PostgreSQL.CommonDBATasks.html#Appendix.PostgreSQL.CommonDBATasks.PostGIS
create extension postgis;
create extension fuzzystrmatch;
create extension postgis_tiger_geocoder;
create extension postgis_topology;
alter schema tiger owner to rds_superuser;
alter schema tiger_data owner to rds_superuser;
alter schema topology owner to rds_superuser;
import aws from 'aws-sdk-promise';
import url from 'url';
import https from 'https';
import fs from 'mz/fs';
import _ from 'lodash';
import path from 'path';
import crypto from 'crypto';
(async function() {
@ff6347
ff6347 / script.js
Last active March 15, 2019 05:45 — forked from romanlab/script.js
basic node js script for github actions (great pattern to check if we are a module or cli)
const program = require('commander')
const fs = require('fs')
async function doSomething(arg) { return arg }
async function main() {
const event = JSON.parse(fs.readFileSync('/github/workflow/event.json', 'utf8'))
const firstArg = program.firstArg
@ff6347
ff6347 / webpack.banner.js
Created February 28, 2019 04:49 — forked from kevinSuttle/webpack.banner.js
Webpack auto-injecting banner into each file
const pkg = require('./package.json');
const moment = require('moment');
const localTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone
const timeStamp = moment().format('LLLL');
const banner = `
Generated on ${timeStamp} - ${localTimeZone}
Description: ${pkg.description}
Package: ${pkg.name}
Version: v${pkg.version}
Contributors: ${pkg.contributors.map(function(contributor){ return contributor})}
@ff6347
ff6347 / mulle-ls-dot
Created February 1, 2019 08:35 — forked from mulle-nat/mulle-ls-dot
Recursive Graphviz view of your current directory
#! /usr/bin/env bash
#
# Copyright (c) 2018 Nat! - Mulle kybernetiK
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
@ff6347
ff6347 / flip.js
Created January 29, 2019 14:05 — forked from jasny/flip.js
Turn text upside down with JavaScript
//this script is based on coding by Reverse Fad http://www.revfad.com
function flip() {
var result = flipString(document.f.original.value.toLowerCase());
document.f.flipped.value = result;
}
function flipString(aString) {
var last = aString.length - 1;
var result = new Array(aString.length)
for (var i = last; i >= 0; --i) {
var c = aString.charAt(i)
@ff6347
ff6347 / pandocslides-README.md
Created November 5, 2018 11:47
A Pandoc template to generate reveal.js slideshows.

Description

This is a Pandoc template to generate reveal.js slideshows.

Definitions

Pandoc is a "universal markup converter" you can run from the command line to convert a simple, plain text file into a beautifully formatted PDF, .docx, HTML, LaTeX, slideshows… the list goes on.

reveal.js is a CSS and JavaScript framework for creating beautiful presentations in HTML5, designed by Hakim El Hattab.

@ff6347
ff6347 / gist:8f6469544593257d80cfcbec9149ef0e
Created June 13, 2018 20:23 — forked from tayvano/gist:6e2d456a9897f55025e25035478a3a50
complete list of ffmpeg flags / commands
Originall From: Posted 2015-05-29 http://ubwg.net/b/full-list-of-ffmpeg-flags-and-options
This is the complete list that’s outputted by ffmpeg when running ffmpeg -h full.
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}…
Getting help:
-h — print basic options
-h long — print more options
-h full — print all options (including all format and codec specific options, very long)