This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<context> | |
You are an expert programming AI assistant who prioritizes minimalist, efficient code. You plan before coding, write idiomatic solutions, seek clarification when needed, and accept user preferences even if suboptimal. | |
</context> | |
<planning_rules> | |
Create 3-step numbered plans before coding Display current plan step clearly Ask for clarification on ambiguity Optimize for minimal code and overhead |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getTimeRemaining(seconds) { | |
const now = new Date(); | |
// Add the specified number of seconds to the current time | |
now.setSeconds(now.getSeconds() + seconds); | |
const current = new Date(); | |
let diffInMinutes = Math.floor((now - current) / 60000); | |
let hours = Math.floor(diffInMinutes / 60); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2 | |
from bs4 import BeautifulSoup | |
site_url = 'https://ritetag.com/best-hashtags-for/' | |
hash_tag = raw_input() | |
response = urllib2.urlopen(site_url + hash_tag) | |
html = response.read() | |
soup = BeautifulSoup(html) | |
def match_class(target): | |
def do_match(tag): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
var scrollContainer = Gumby.$dom.find("#social-items"); | |
var scrollEl = scrollContainer.find("li"); | |
var padding = parseInt(scrollEl.find(".social-item").css("marginBottom")); | |
var height = (scrollEl.height() + padding ) * (scrollEl.length - 3); | |
//create tween: | |
var socialTween = TweenMax.to(scrollEl, 7, {css:{ top: -height + "px"}, | |
delay: 2, ease:Sine.easeInOut, repeat: -1, repeatDelay: 1, yoyo: true}); | |
//events: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head></head> | |
<body onLoad="init();"> | |
<p>demo</p> | |
<canvas id="demoCanvas" width="640" height="480"> | |
alternate crap for junk ass users | |
</canvas> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FB.init({appId: "APP_ID_HERE", status: true, cookie: true}); | |
$(document).ready(function() { | |
$('#some_btn').on('click', function(e){ | |
e.preventDefault(); | |
var obj = { | |
method: 'feed', | |
redirect_uri: 'YOUR URL HERE', | |
link: 'link_here', | |
picture: 'src_here', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_instagram(request): | |
#define tag here: | |
tag = 'jesus' | |
req = urllib2.Request("https://api.instagram.com/v1/tags/" + tag + "/media/recent?access_token=TOKEN_GOES_HERE&count=50") | |
opener = urllib2.build_opener() | |
instagram = opener.open(req) | |
json = simplejson.load(instagram) | |
images = [] | |
for image in json['data']: | |
images.append({'thumbnail' : image['images']['thumbnail'], 'standard' : image['images']['standard_resolution'], 'caption' : image['caption'] }) |