Skip to content

Instantly share code, notes, and snippets.

View solancer's full-sized avatar
🎯
Focusing

Srinivas Gowda solancer

🎯
Focusing
View GitHub Profile

##Open Graph Code Snippet

Put this in the header of your site. Update the info below with dynamic content leaving article as is.

<meta property="og:title" content="Site Title" />
<meta property="og:type" content="article" />
<meta property="og:image" content="Image URL" />
<meta property="og:url" content="Page URL" />
<meta property="og:description" content="Page Description" />
@solancer
solancer / droplet-proxy.sh
Created April 14, 2016 13:16
Proxy Server on Digitalocean Droplet
#!/usr/bin/env bash
# How to start:
# 1. Sign up for DigitalOcean with this link https://www.digitalocean.com/
# 2. Go to https://cloud.digitalocean.com/settings/applications and find you API key
# 3. In your shell, run 'export DIGITALOCEAN_TOKEN="INSERT TOKEN HERE"', without the outer quotes.
# 4. `brew install jq`
# 5. `./digitalocean-proxy`
# 6. When you are done, press CTRL+C ONCE, and everything will be cleaned up.
@solancer
solancer / Mysql Cheat Sheet
Created March 29, 2016 14:52
Mysql Cheat Sheet
MySQL Common Commands
Access monitor: mysql -u [username] -p; (will prompt for password)
Show all databases: show databases;
Access database: mysql -u [username] -p [database] (will prompt for password)
Create new database: create database [database];
@solancer
solancer / gist:6e0bab55e97cfb6d0d5b
Created December 16, 2015 00:37 — forked from slivero/gist:3164297
Resampling a JPEG image in PHP using GD (not imagemagick)
<?php
/**
* Class used for resampling images
*/
class Resampler
{
/**
* Resample an image
*
@solancer
solancer / jpegResizer.py
Created December 15, 2015 23:30
jpegResizer.py Author: Srinivas Gowda
#/usr/bin/env python
import sys
import os.path
import PIL
from PIL import Image
if __name__ == "__main__":