Skip to content

Instantly share code, notes, and snippets.

View andrew-oko-odion's full-sized avatar

Andrew Oko-odion andrew-oko-odion

View GitHub Profile

Run each of the following lines, replacing yourdomain.com and codehere with your details:

now dns add yourdomain.com @ TXT google-site-verification=codehere
now dns add yourdomain.com @ MX ASPMX.L.GOOGLE.COM 1
now dns add yourdomain.com @ MX ALT1.ASPMX.L.GOOGLE.COM 5
now dns add yourdomain.com @ MX ALT2.ASPMX.L.GOOGLE.COM 5
now dns add yourdomain.com @ MX ALT3.ASPMX.L.GOOGLE.COM 10
now dns add yourdomain.com @ MX ALT4.ASPMX.L.GOOGLE.COM 10
@andrew-oko-odion
andrew-oko-odion / sources.list
Last active November 20, 2019 12:56
Debian APT source
# Terry Add this file to /etc/apt/sources.list
# do sudo apt update
# then you can now install emacs using `sudo apt-get install emacs`
deb http://deb.debian.org/debian stretch main contrib non-free
deb-src http://deb.debian.org/debian stretch main contrib non-free
deb http://deb.debian.org/debian stretch-updates main contrib non-free
deb-src http://deb.debian.org/debian stretch-updates main contrib non-free
class AuthScreen extends React.Component {
constructor(props){
super(props);
this.state = { loading: false, isAuthenticated: true }
}
render(){
const Loading = (props) =>
@andrew-oko-odion
andrew-oko-odion / web-servers.md
Created May 13, 2018 13:18 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@andrew-oko-odion
andrew-oko-odion / README.md
Created February 13, 2018 13:26
Sequelize + Express + Migrations + Seed Starter
@andrew-oko-odion
andrew-oko-odion / fetch-api-post.js
Created September 27, 2017 15:58 — forked from deanhume/fetch-api-post.js
A simple POST request using the fetch API
fetch(url, {
method: 'POST',
headers: {
'auth': '1234'
},
body: JSON.stringify({
name: 'dean',
login: 'dean',
})
})
@andrew-oko-odion
andrew-oko-odion / Webpack and toastr
Created September 27, 2017 04:05 — forked from MFry/Webpack and toastr
Getting toastr npm to play with webpack
//In case anyone was having the same issue in getting toastr to run with webpack and es6
@andrew-oko-odion
andrew-oko-odion / running_app_in_production_locally.markdown
Last active September 14, 2017 09:11 — forked from rwarbelow/running_app_in_production_locally.markdown
How to Run a Rails App in Production Locally
  1. Add gem 'rails_12factor' to your Gemfile. This will add error logging and the ability for your app to serve static assets.
  2. bundle
  3. Run RAILS_ENV=production rake db:create db:migrate db:seed
  4. Run rake secret and copy the output
  5. From the command line: export SECRET_KEY_BASE=output-of-rake-secret
  6. To precompile your assets, run rake assets:precompile. This will create a folder public/assets that contains all of your assets.
  7. Run RAILS_ENV=production rails s and you should see your app.

For Rails 5 using webpacker, Add.

RAILS_ENV=production rails webpacker:compile Remember to clobber your assets (rake assets:clobber) and re-precompile (rake assets:precompile) if you make changes.

@andrew-oko-odion
andrew-oko-odion / README-Template.md
Created June 25, 2017 12:38 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@andrew-oko-odion
andrew-oko-odion / jquery-crash-course.md
Created January 11, 2017 06:46 — forked from mwalters/jquery-crash-course.md
A friend needed a crash course in jQuery basics. I thought it might be helpful to capture it. Feel free to suggest corrections / modifications / additions.

Ok, crash course in jQuery and stuff:

Accessing jQuery

jQuery makes a global object, typically referenced by "$". There's also something called no-conflict mode where you'd reference it by "jQuery", but you won't see that too often in what we're doing, but just in case you encounter it, essentially these are the same:

$('.article')
jQuery('.article')

Element Selection