Skip to content

Instantly share code, notes, and snippets.

View kevincobain2000's full-sized avatar

Pulkit Kathuria kevincobain2000

View GitHub Profile
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class Codesniffer extends Command
{
/**
* {@inheritdoc}
*/
@kevincobain2000
kevincobain2000 / pinterest_scrape.php
Last active December 20, 2020 14:04
Pinterest Search From Tags, Unofficial Scrape PHP
public function searchPinterest($q)
{
$url = "https://jp.pinterest.com/search/pins/?q=$q";
$html = file_get_contents($url);
$domd = new \DOMDocument();
libxml_use_internal_errors(true);
$domd->loadHTML($html);
libxml_use_internal_errors(false);
@kevincobain2000
kevincobain2000 / dribbble.css
Created December 30, 2016 13:34
Create social media buttons with CSS3 gradients.
/*
Dribbble
------------------------------------------------------------ */
a.button-dribbble {
background-color: #c93764; /* fallback color */
background: -moz-linear-gradient(top, #ea4c89, #c93764);
background: -ms-linear-gradient(top, #ea4c89, #c93764);
background: -webkit-linear-gradient(top, #ea4c89, #c93764);
border: 1px solid #c93764;
@kevincobain2000
kevincobain2000 / auto_scroll.js
Created April 13, 2016 06:17
auto_scroll.js
function pageScroll() {
window.scrollBy(0,10);
scrolldelay = setTimeout(pageScroll,10);
}
{
"x": ["Mon","Tue","Wed"],
"y": [[4,8,7], [10,20,24]],
"names": ["Sleeping", "Awake"]
}
@kevincobain2000
kevincobain2000 / fbAndParseInitialize.md
Last active August 29, 2015 14:17
How to initialize facebook sdk and parse for parse.com facebook login in angularjs $app.run and factory/service.

How to initialize facebook sdk and parse for parse.com facebook login in angularjs $app.run and factory/service.

Functions in the controller can then be used by making sure that both libs have been loaded and initialized. Solution to the following errors

You need to call Parse.initialize before using Parse.
The Facebook JavaScript SDK must be loaded before calling init.

constants.js

@kevincobain2000
kevincobain2000 / iOS-7-Styled-clear-button-bar.markdown
Last active August 29, 2015 14:14
iOS 7 Styled clear button bar
@kevincobain2000
kevincobain2000 / git-svn-diff
Created September 8, 2014 06:35
git svn diff
#!/bin/sh
#
# git-svn-diff
# Generate an SVN-compatible diff against the tip of the tracking branch
TRACKING_BRANCH=`git config --get svn-remote.svn.fetch | sed -e 's/.*:refs\/remotes\///'`
REV=`git svn find-rev $(git rev-list --date-order --max-count=1 $TRACKING_BRANCH)`
git diff --no-prefix $(git rev-list --date-order --max-count=1 $TRACKING_BRANCH) $* |
sed -e "s/^+++ .*/& (working copy)/" -e "s/^--- .*/& (revision $REV)/" \
-e "s/^diff --git [^[:space:]]*/Index:/" \
-e "s/^index.*/===================================================================/"%
@kevincobain2000
kevincobain2000 / instagram_semi_bot.md
Last active August 29, 2015 14:05
Instagram likes and comments semi bot
  1. Open Chrome
  2. Go there -> http://websta.me/tag/cat
  3. Open Console (CMD+j)
  4. Paste the code and hit enter
  5. Repeat 2-5 for desired hashtags i.e s/cat/yourhashtag
// Click the like button, Note that instagram has limited the number of likes
// As far as I can tell more than 70 likes within one minute and you have to wait for another hour
$(".likeButton").each(function(index) {
@kevincobain2000
kevincobain2000 / remodal.css
Last active August 29, 2015 14:04
remodal css without the transitions and font
/* ==========================================================================
Remodal necessary styles
========================================================================== */
/* Hide scroll bar */
html.remodal_lock, body.remodal_lock {
overflow: hidden;
}