Skip to content

Instantly share code, notes, and snippets.

View Gaurav2728's full-sized avatar
๐Ÿ 
Working from home

Gaurav Sharma Gaurav2728

๐Ÿ 
Working from home
View GitHub Profile
@Gaurav2728
Gaurav2728 / history.txt
Created July 14, 2012 16:13 — forked from unak/history.txt
The History of Ruby
* ๅŽŸๅ‰‡ใจใ—ใฆๅฎ‰ๅฎš็‰ˆใฎใƒชใƒชใƒผใ‚นใฎใฟใ‚’ๅˆ—ๆŒ™ใ—ใ€็‰นใซ้‡่ฆใจๆ€ใ‚ใ‚Œใ‚‹้žๅฎ‰ๅฎš็‰ˆใฎใƒชใƒชใƒผใ‚นใ‚’ใ€Œnot stableใ€ใจใ—ใฆ่จ˜่ผ‰ใ—ใŸใ€‚
* ๅ„ใƒชใƒชใƒผใ‚นใฎๅ‡บๆ‰€ใจใชใฃใŸใƒ–ใƒฉใƒณใƒใ‚’ๆ˜Ž่จ˜ใ—ใ€ใพใŸใใ‚Œใ‚‰ใฎใƒ–ใƒฉใƒณใƒใฎ็™บ็”Ÿๆ™‚ๆœŸใ‚‚็คบใ—ใŸใ€‚ใชใŠใƒชใƒใ‚ธใƒˆใƒชใฎSubversionๅŒ–ๅ‰ใฏtrunkใจใ„ใ†็”จ่ชžใฏไฝฟใ‚ใ‚Œใฆใ„ใชใ„ใŒใ€ๆททไนฑใ‚’้ฟใ‘ใ‚‹ใŸใ‚ใซ็ตฑไธ€ใ—ใŸใ€‚ใพใŸใ€ruby_1_8_7ใƒ–ใƒฉใƒณใƒใฏไบ‹ๆ•…ใฎใŸใ‚ใซ1.8.7ใƒชใƒชใƒผใ‚นๅพŒใซv1_8_7ใ‚ฟใ‚ฐใ‹ใ‚‰ๅˆ‡ใ‚Š็›ดใ•ใ‚Œใฆใ„ใ‚‹ใ€‚
* ๅ…จๅ›ฝ่ฆๆจกใ‚ใ‚‹ใ„ใฏๅ…จไธ–็•Œ่ฆๆจก(?)ใฎใ‚คใƒ™ใƒณใƒˆใ‚’ๅ‚่€ƒใฎใŸใ‚ใซ่จ˜่ผ‰ใ—ใŸใ€‚้–‹ๅ‚ฌๅœฐใฏ่‹ฑ่ชžๅœใง้€š็”จใ—ใฆใ„ใ‚‹ใจๆ€ใ‚ใ‚Œใ‚‹่กจ่จ˜ใ‚’ๆŽก็”จใ—ใŸใ€‚
* 1.2.1ใฏrepackใจ็งฐใ—ใฆ2ๅ›ž็›ฎใฎใƒชใƒชใƒผใ‚นใŒ่กŒใ‚ใ‚ŒใŸใ€‚ไป–ใซใ‚‚ๅŒๆง˜ใฎไพ‹ใŒใ‚ใ‚‹ใŒใ€ใใ‚Œใ‚‰ใฏๆ—ฅไป˜ใŒๅค‰ใ‚ใฃใฆใ„ใชใ„ใฎใง่จ˜่ผ‰ใ—ใฆใ„ใชใ„ใ€‚
* 1.0ใฏๅคง้‡ใซๆ—ฅไป˜ใคใใงใƒชใƒชใƒผใ‚นใ•ใ‚ŒใŸใฎใง้€”ไธญใฏๅ‰ฒๆ„›ใ—ใŸใ€‚
* ๅ„ๅฎ‰ๅฎš็‰ˆ็ณปๅˆ—ใฎๆœ€็ต‚ใƒใƒผใ‚ธใƒงใƒณใซใฏใ€Œfinalใ€ใจ่จ˜่ผ‰ใ—ใŸใ€‚ใชใŠใ€1.4็ณปๅˆ—ใซใคใ„ใฆใฏใ‚ชใƒ•ใ‚ฃใ‚ทใƒฃใƒซใซใฏ็ต‚ไบ†ใฎใ‚ขใƒŠใ‚ฆใƒณใ‚นใฏใชใ„ใŒใ€็ต‚ไบ†ใ—ใฆใ„ใ‚‹ๆ—จใฎ้žๅ…ฌๅผใช่จ€ๅŠใฏๆ•ฃ่ฆ‹ใ•ใ‚Œใ‚‹ใŸใ‚ๆ—ขใซ็ต‚ไบ†ใ—ใฆใ„ใ‚‹ใจใฟใชใ—ใŸใ€‚
1993-02-24 (start)
1995-12-21 0.95 (not stable; first public release)
1996-12-25 1.0-961225 (from trunk)
@Gaurav2728
Gaurav2728 / VdbeIntExtract.h
Created October 20, 2012 06:36 — forked from mattrco/VdbeIntExtract.h
Selected attributes of struct Vdbe from VdbeInt.h
struct Vdbe {
sqlite3 *db; /* The database connection that owns this statement */
Op *aOp; /* Space to hold the virtual machine's program */
Mem *aMem; /* The memory locations */
Mem **apArg; /* Arguments to currently executing user function */
Mem *aColName; /* Column names to return */
Mem *pResultSet; /* Pointer to an array of results */
int nMem; /* Number of memory locations currently allocated */
int nOp; /* Number of instructions in the program */
VdbeCursor **apCsr; /* One element of this array for each open cursor */
@Gaurav2728
Gaurav2728 / ml-ruby.md
Created May 9, 2016 07:59 — forked from gbuesing/ml-ruby.md
Resources for Machine Learning in Ruby

Resources for Machine Learning in Ruby

Gems

@Gaurav2728
Gaurav2728 / lets-encrypt-nginx.md
Created June 4, 2017 12:05 — forked from padde/lets-encrypt-nginx.md
Let's Encrypt with Nginx

Let's Encrypt with Nginx

Here's how I set up a tiny Nginx/Rails server that uses HTTPS via a Let's Encrypt issued certificate.

https://letsencrypt.paddd.de/

Server

I use the smallest DigitalOcean droplet (512 MB) here, which is built from the "Ubuntu Ruby on Rails on 14.04" image provided by them.

@Gaurav2728
Gaurav2728 / psqlfix.txt
Created January 25, 2018 16:51
Change postgres default template0 to UTF8 encoding
mike@rbci:~$ psql -U postgres
psql (9.0.3)
Type "help" for help.
postgres=# update pg_database set datallowconn = TRUE where datname = 'template0';
UPDATE 1
postgres=# \c template0
You are now connected to database "template0".
template0=# update pg_database set datistemplate = FALSE where datname = 'template1';
UPDATE 1
@Gaurav2728
Gaurav2728 / notify_slack.rb
Created May 17, 2018 16:12 — forked from seancdavis/notify_slack.rb
Post incoming webhook to Slack using Ruby
# Assumes:
# - curl is installed
# - you have a slack channel with an incoming webhook configured
require 'json'
def notify_slack(webhook_url, channel, username, text, image)
payload = {
:channel => channel,
:username => username,
@Gaurav2728
Gaurav2728 / MySQL_5-7_macOS.md
Created December 6, 2018 08:18 — forked from robhrt7/MySQL_5-7_macOS.md
Install MySQL 5.7 on macOS using Homebrew

This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.