Skip to content

Instantly share code, notes, and snippets.

View gopperman's full-sized avatar

Greg Opperman gopperman

View GitHub Profile
@gopperman
gopperman / postgres-cheatsheet.md
Created October 23, 2017 20:48 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@gopperman
gopperman / index.html
Created March 23, 2017 19:33
HTML5 boilerplate
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>untitled</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
@gopperman
gopperman / README.md
Created November 11, 2016 21:36 — forked from natebates/README.md
CSS Cheeseburger

Received a McDonald's flyer and thought the simple cheeseburger could be easily CSS'd.

Perhaps I'll update it to be bulletproof cross-browser, but for now the cheese drips look best in Chrome.

@gopperman
gopperman / 01-gulpfile.js
Created February 13, 2016 01:38 — forked from markgoodyear/01-gulpfile.js
Comparison between gulp and Grunt. See http://markgoodyear.com/2014/01/getting-started-with-gulp/ for a write-up.
/*!
* gulp
* $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev
*/
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
cssnano = require('gulp-cssnano'),

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

@gopperman
gopperman / gist:7418121
Last active December 28, 2015 01:09 — forked from anonymous/gist:7418114
JQuery in-page Smooth Scrolling
$(function() {
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
jQuery(document).ready(function() {
jQuery.fn.cleardefault = function() {
return this.focus(function() {
if( this.value == this.defaultValue ) {
this.value = "";
}
}).blur(function() {
if( !this.value.length ) {
this.value = this.defaultValue;
}
wget https://github.com/downloads/pooler/cpuminer/pooler-cpuminer-2.2.3-linux-x86_64.tar.gz
tar -xvzf pooler-cpuminer-2.2.3-linux-x86_64.tar.gz
# Replace USER, ID & PASS with your creds setup on http://litecoinpool.org/account
echo "nohup nice -n 20 ./minerd --url http://litecoinpool.org:9332/ --userpass USER.ID:PASS" > litecoin.sh
chmod a+x litecoin.sh
./litecoin.sh &
# Find thir process
# ps axl | grep lite