Skip to content

Instantly share code, notes, and snippets.

@karabanov
karabanov / .BASH-PROMPT.png
Created November 18, 2019 10:59 — forked from kfcobrien/.BASH-PROMPT.png
Clean informative bash prompt with git info
.BASH-PROMPT.png
require_once 'vendor/autoload.php';
use Google\Spreadsheet\DefaultServiceRequest;
use Google\Spreadsheet\ServiceRequestFactory;
putenv('GOOGLE_APPLICATION_CREDENTIALS=' . __DIR__ . '/my_secret.json');
/* SEND TO GOOGLE SHEETS */
$client = new Google_Client;
try{
$client->useApplicationDefaultCredentials();
$client->setApplicationName("Something to do with my representatives");
@karabanov
karabanov / README-Template.md
Created September 18, 2019 17:59 — 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

import socket
from BaseHTTPServer import HTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
class MyHandler(SimpleHTTPRequestHandler):
def do_GET(self):
if self.path == '/ip':
self.send_response(200)
self.send_header('Content-type', 'text/html')
self.end_headers()
@karabanov
karabanov / Log.php
Created October 2, 2012 12:40 — forked from taktos/Log.php
PHP tail viewer
<?php
/**
* Require the library
*/
require 'PHPTail.php';
/**
* Initilize a new instance of PHPTail
* @var PHPTail
*/
$tail = new PHPTail("/path/to/log");