Skip to content

Instantly share code, notes, and snippets.

View dkobia's full-sized avatar

David Kobia dkobia

View GitHub Profile
Jan 1 00:53:54 OpenWrt local2.info chat[31454]: abort on (BUSY)
Jan 1 00:53:54 OpenWrt local2.info chat[31454]: abort on (NO CARRIER)
Jan 1 00:53:54 OpenWrt local2.info chat[31454]: abort on (ERROR)
Jan 1 00:53:54 OpenWrt local2.info chat[31454]: report (CONNECT)
Jan 1 00:53:54 OpenWrt local2.info chat[31454]: timeout set to 10 seconds
Jan 1 00:53:54 OpenWrt local2.info chat[31454]: send (AT&F^M)
Jan 1 00:53:54 OpenWrt local2.info chat[31454]: expect (OK)
Jan 1 00:53:54 OpenWrt local2.info chat[31454]: AT&F^M^M
Jan 1 00:53:54 OpenWrt local2.info chat[31454]: OK
Jan 1 00:53:54 OpenWrt local2.info chat[31454]: -- got it
Jan 1 00:00:39 OpenWrt kern.warn kernel: [ 39.810000] usb 1-1.2: config 1 has an invalid interface number: 7 but max is 6
Jan 1 00:00:39 OpenWrt kern.warn kernel: [ 39.820000] usb 1-1.2: config 1 has no interface number 4
Jan 1 00:00:39 OpenWrt kern.info kernel: [ 39.840000] option 1-1.2:1.0: GSM modem (1-port) converter detected
Jan 1 00:00:39 OpenWrt kern.info kernel: [ 39.850000] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB0
Jan 1 00:00:39 OpenWrt kern.info kernel: [ 39.860000] option 1-1.2:1.1: GSM modem (1-port) converter detected
Jan 1 00:00:39 OpenWrt kern.info kernel: [ 39.860000] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB1
Jan 1 00:00:39 OpenWrt kern.info kernel: [ 39.870000] option 1-1.2:1.2: GSM modem (1-port) converter detected
Jan 1 00:00:39 OpenWrt kern.info kernel: [ 39.880000] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB2
Jan 1 00:00:39 OpenWrt kern.info kernel: [ 39.880000] option 1-1.2:1.3: GSM modem (1-port)
Jan 1 00:01:34 OpenWrt local2.info chat[3161]: abort on (BUSY)
Jan 1 00:01:34 OpenWrt local2.info chat[3161]: abort on (NO CARRIER)
Jan 1 00:01:34 OpenWrt local2.info chat[3161]: abort on (ERROR)
Jan 1 00:01:34 OpenWrt local2.info chat[3161]: report (CONNECT)
Jan 1 00:01:34 OpenWrt local2.info chat[3161]: timeout set to 10 seconds
Jan 1 00:01:34 OpenWrt local2.info chat[3161]: send (AT&F^M)
Jan 1 00:01:34 OpenWrt local2.info chat[3161]: expect (OK)
Jan 1 00:01:34 OpenWrt local2.info chat[3161]: AT&F^M^M
Jan 1 00:01:34 OpenWrt local2.info chat[3161]: OK
Jan 1 00:01:34 OpenWrt local2.info chat[3161]: -- got it
3g-wan Link encap:Point-to-Point Protocol
inet addr:21.188.151.3 P-t-P:10.64.64.64 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:6767 errors:9 dropped:0 overruns:0 frame:0
TX packets:4577 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:6768662 (6.4 MiB) TX bytes:574094 (560.6 KiB)
eth0 Link encap:Ethernet HWaddr 10:FE:ED:C3:2D:68
UP BROADCAST MULTICAST MTU:1500 Metric:1
@dkobia
dkobia / clamav-mac.md
Last active February 7, 2017 20:41 — forked from Uchean/clamav-mac.md
Get ClamAV running on Mac OS X (using Homebrew)

Get ClamAV running on Mac OS X (using Homebrew)

The easiest way to get the ClamAV package is using Homebrew

$ brew install clamav

Before trying to start the clamd process, you'll need a copy of the ClamAV databases.

Create a freshclam.conf file and configure as so

@dkobia
dkobia / dynamodbLocal.md
Created May 25, 2017 20:27
Easy DynamoDB Local Environment (Mac OSX / Linux)

Set Up DynamoDB

  • Get DynamoDB
$ wget http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest.tar.gz
  • Unzip
$ gunzip dynamodb_local_latest.tar.gz
@dkobia
dkobia / self-signed-certificate-with-custom-ca.md
Last active December 1, 2019 07:46 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096

How to setup AWS lambda function to talk to the internet and VPC

I'm going to walk you through the steps for setting up a AWS Lambda to talk to the internet and a VPC. Let's dive in.

So it might be really unintuitive at first but lambda functions have three states.

  1. No VPC, where it can talk openly to the web, but can't talk to any of your AWS services.
  2. VPC, the default setting where the lambda function can talk to your AWS services but can't talk to the web.
  3. VPC with NAT, The best of both worlds, AWS services and web.
@dkobia
dkobia / psql-with-gzip-cheatsheet.sh
Created February 12, 2018 23:44 — forked from brock/psql-with-gzip-cheatsheet.sh
Exporting and Importing Postgres Databases using gzip
# This is just a cheat sheet:
# On production
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz
# On local
scp -C production:~/database.sql.gz
dropdb database && createdb database
gunzip < database.sql.gz | psql database
@dkobia
dkobia / DockerFile_app
Created April 12, 2018 16:51 — forked from satendra02/app.DockerFile
docker+rails+puma+nginx+postgres (Production ready)
FROM ruby:2.3.1
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
# Configuring main directory
RUN mkdir -p /app_name
WORKDIR /app_name
# Setting env up
ENV RAILS_ENV='production'
ENV RAKE_ENV='production'