Skip to content

Instantly share code, notes, and snippets.

View nhunsaker's full-sized avatar

Nathan O'Brien nhunsaker

  • BuzzFeed & N8+US, Inc
  • Minneapolis, MN USA
View GitHub Profile
# AdBlock for iOS DNS Proxy rules
Global Adservers/tiktok.com
Global Adservers/snapchat.com
Global Adservers/instagram.com
Global Adservers/facebook.com
Global Adservers/twitter.com
Global Adservers/omegle.com
Global Adservers/monkey.app
Global Adservers/tider.com
Global Adservers/pornhub.com
// Jump the wall for NYT Recipes
// EX: https://cooking.nytimes.com/recipes/1023659-rice-krispie-treats?action=click&module=Tag%20Page%20Recipe%20Card&region=cookies%20and%20bars&pgType=tag&rank=1
let divs = document.getElementsByTagName('div');
document.body.style.cssText += 'overflow:scroll';
document.body.removeAttribute('class');
for (var i=0, max=divs.length; i<max; i++) {
if ( divs[i].className.includes('modal_modal-window-container') ) {
divs[i].remove();
}
if ( divs[i].id.includes('lire') ) {
# FACEBOOK_VIDEO
# Video aspect ratio must be between 9:16 and 16:9
.rules_for('display_aspect_ratio', lambda u: int((u['width'] / u['height']) # 100)) \
.is_between(56.25, 177, msg_func=lambda u: 'Video aspect ratio must be between 9:16 and 16:9') \
# Video must be under 4GB (only a recommendation)
.rules_for('file_size', lambda u: u['file_size']) \
.is_less_than((4 # 1000)) + 1, msg_func=lambda u: 'Video must be less than 4 GB in size') \
@nhunsaker
nhunsaker / txt
Last active March 14, 2019 19:18
instagram_video_publish_now_curl
curl -X POST \
http://dev.buzzfeed.io:33005/pubhub/drafts \
-H 'Content-Type: application/json' \
-H 'Postman-Token: e4f660d9-bbd6-416f-9968-97fb4559527b' \
-H 'X-Auth-Token: {insert token}' \
-H 'X-Forwarded-Email: your.email@buzzfeed.com' \
-H 'X-Forwarded-User-Id: 1' \
-H 'X-Send-To-Platform: true' \
-H 'cache-control: no-cache' \
-d '{
---
default:
...
navigation:
recipes:
loc: /
title: Recipes
submenu:
- key: halloween
category: occasions
import PropTypes from 'prop-types';
import React from 'react';
import FacebookLogin from '../../components/facebook_login';
import DraftDetail from '../drafts/detail';
import DraftList from '../drafts/list';
import Toast from '../../components/toast';
import Loader from '../../components/loader';
import PubHubLoader from '../../components/pubhub-loader';
import Icons from '../../components/icons';
import cn from 'classnames';
import { connect } from 'react-redux';
import RemoteView from './view';
import { HAS_READ_WRITE_PERMISSION } from '../../lib/permissions';
import { PH_AUTH_URL, IS_DEV_OR_STAGE } from '../../lib/env_vars';
import { Cookies } from 'react-cookie';
import {
receiveFacebookLogin,
receiveFacebookLogout,
receiveFacebookAccounts,
receiveFacebookPermissions,
<h1>hello world</h1>
import tornado.httpclient
import json
import logging
from lib.rig import settings
from handlers.base import BaseHandler
class HomeHandler(BaseHandler):
import tornado.httpclient
import json
import logging
from lib.rig import settings
from handlers.base import BaseHandler
class HomeHandler(BaseHandler):