Skip to content

Instantly share code, notes, and snippets.

@Pokom
Pokom / how-to-install-latest-gcc-on-ubuntu-lts.txt
Created May 2, 2018 23:46 — forked from application2000/how-to-install-latest-gcc-on-ubuntu-lts.txt
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
@Pokom
Pokom / monitor_internet_connection.js
Created December 31, 2017 19:41 — forked from ebidel/monitor_internet_connection.js
Puppeteer: monitor status of internet connectivity using headless Chrome
/**
* @author ebidel@ (Eric Bidelman)
* License Apache-2.0
*/
// Uses puppeteer and the browser's online/offline events to monitor connection status.
const util = require('util');
const dns = require('dns');
const puppeteer = require('puppeteer');
@Pokom
Pokom / how-to-add-image-to-gist.md
Created December 29, 2017 20:27 — forked from remarkablemark/how-to-add-image-to-gist.md
How to add an image to a gist

How to add an image to a gist

  1. Create a gist if you haven't already.
  2. Clone your gist:
    # make sure to replace `<hash>` with your gist's hash
    git clone https://gist.github.com/<hash>.git # with https
    git clone git@gist.github.com:<hash>.git     # or with ssh
@Pokom
Pokom / README-Template.md
Created December 12, 2017 12:26 — 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

@Pokom
Pokom / gist:91e96dcf43e4c5bea96d7afffc202b3c
Created October 16, 2017 16:45 — forked from madis/gist:4650014
Testing CORS OPTIONS request with curl
curl \
--verbose \
--request OPTIONS \
http://localhost:8080/re/routestatus/allRoutes \
--header 'Origin: http://localhost:9292' \
--header 'Access-Control-Request-Headers: Origin, Accept, Content-Type' \
--header 'Access-Control-Request-Method: GET'
# http://nils-blum-oeste.net/cors-api-with-oauth2-authentication-using-rails-and-angularjs/#.UQJeLkp4ZyE
@Pokom
Pokom / remove-docker-containers.md
Created August 12, 2017 21:05 — forked from ngpestelos/remove-docker-containers.md
How to remove unused Docker containers and images
  1. Delete all containers

     $ docker ps -q -a | xargs docker rm
    

-q prints only the container IDs -a prints all containers

Notice that it uses xargs to issue a remove container command for each container ID

  1. Delete all untagged images
@Pokom
Pokom / Contract Killer 3.md
Last active November 29, 2016 23:41 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Between [company name]

And [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.

So in short;