Skip to content

Instantly share code, notes, and snippets.

View juyal-ahmed's full-sized avatar
:octocat:
Finalizing

Juyal Ahmed juyal-ahmed

:octocat:
Finalizing
View GitHub Profile
@juyal-ahmed
juyal-ahmed / indexed.php
Created June 24, 2016 04:51 — forked from qsun/indexed.php
Check if URL is indexed by Google
<?php
function indexed($url) {
$url = 'http://webcache.googleusercontent.com/search?q=cache:' . urlencode($url);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Chrome 10');
@juyal-ahmed
juyal-ahmed / base64.js
Created May 19, 2016 11:55 — forked from jhurliman/base64.js
An extremely simple implementation of base64 encoding / decoding using node.js Buffers (plus url-safe versions)
/*
* base64.js: An extremely simple implementation of base64 encoding / decoding using node.js Buffers
*
* (C) 2010, Nodejitsu Inc.
* (C) 2011, Cull TV, Inc.
*
*/
var base64 = exports;
@juyal-ahmed
juyal-ahmed / 0_reuse_code.js
Created April 11, 2016 07:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@juyal-ahmed
juyal-ahmed / dump.vim
Created February 18, 2016 09:50 — forked from mattn/dump.vim
google-calendar-holiday
scriptencoding utf-8
let s:calendar_list = [
\ ['Australian Holidays', 'en.australian#[email protected]'],
\ ['Austrian Holidays', 'en.austrian#[email protected]'],
\ ['Brazilian Holidays', 'en.brazilian#[email protected]'],
\ ['Canadian Holidays', 'en.canadian#[email protected]'],
\ ['China Holidays', 'en.china#[email protected]'],
\ ['Christian Holidays', 'en.christian#[email protected]'],
\ ['Danish Holidays', 'en.danish#[email protected]'],
@juyal-ahmed
juyal-ahmed / waterline.sails.mongo.native.example.js
Last active November 26, 2015 08:15 — forked from mikermcneil/waterline.sails.mongo.native.example.js
This works in Sails v0.10.0-rc7 (Waterline v0.10.0-rc12)
/**
* PetController
*
* @description :: Server-side logic for managing pets
* @help :: See http://links.sailsjs.org/docs/controllers
*/
module.exports = {
index: function (req,res) {