Skip to content

Instantly share code, notes, and snippets.

View const-g's full-sized avatar
🚀

Constantin Guay const-g

🚀
View GitHub Profile
curl 'http://vim-bootstrap.com/generate.vim' --data 'langs=javascript&langs=php&langs=html&langs=ruby&editor=vim' > ~/.vimrc
set expandtab
set tabstop=4
set softtabstop=4
set shiftwidth=4
colorscheme darkblue
set number
syntax on
set background=dark
@const-g
const-g / .bashrc
Last active August 12, 2017 22:25
.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
{ "keys": ["("], "command": "insert_snippet", "args": {"contents": " ( $0 )"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "source.php" }
]
},
{ "keys": ["("], "command": "insert_snippet", "args": {"contents": " ( ${0:$SELECTION} )"}, "context":
[
from scrapy.spider import BaseSpider
from scrapy.selector import HtmlXPathSelector
from deloitte_listing.items import DeloitteListingItem
class DeloitteListingSpider(BaseSpider):
name = "deloitte_listing"
allowed_domains = ["deloitte.com"]
test> db.salary.find()
{
"_id": ObjectId("5669fee5cdeb623e44ea3f41"),
"emp_id": 3,
"Employee_Name": "Farquleet Shadab",
"Employee_Gender": "Male",
"Employee_Salary": [
{
"month_year": "Jan-2015",
"salary_paid": 100
@const-g
const-g / getShares.php
Last active January 2, 2016 09:39
See http://const.fr/howto-retreive-shares-count-wordpress-posts/ for usage. v. 1.5.6: Fix tag param name v. 1.5.5: Added Sorted by post__in if specified posts. v. 1.5: Added possibility to specify a list of posts to return v. 1.4: Added two more image sizes, added icons to table view v. 1.3: Possibility to add a "from" param v. 1.2: Added possib…
<?php
// =================================================================
// getShares
// @author: Constantin Guay
// @url: https://gist.github.com/Cog-g/8284663
// v. 1.5.6
//
// This script will get number of shares for usual social networks.
//
// @param:
<snippet>
<content><![CDATA[
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="dns-prefetch" href="//fonts.googleapis.com" />
<title>$1</title>
<meta name="description" content="$2">
@const-g
const-g / const.fr_reset.css
Last active December 20, 2015 15:38
This is my reset file, from http://const.fr/my-reset-css/
/**
* RESET CSS
* from http://const.fr/tools/reset
* @version: 3.1
* @date: 2013-11-20
**/
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,