A mixin for writing @font-face rules in SASS.
Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.
@include font-face(Samplino, fonts/Samplino);
import React from 'react'; | |
import axios from 'axios'; | |
import Rx from 'rxjs'; | |
export default class App extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
scores: [] | |
}; |
from __future__ import with_statement | |
from fabric.api import env | |
from fabric.api import * | |
from fabric.contrib.console import confirm | |
from fabric.contrib.project import upload_project | |
import ubuntu | |
import protobuf | |
#!/bin/bash | |
#Download the latest copy of WordPress into a directory, grab all the files in the new /wordpress folder | |
#Put all the files in the current directory, remove the now empty /wordpress directory | |
#Remove the tarball | |
#download latest wordpress with wget | |
wget http://wordpress.org/latest.tar.gz | |
#OR using CURL |
<?php | |
$html = file_get_contents("http://example.com/product/42"); | |
$context = stream_context_create(array( | |
"http" => array( | |
"method" => "POST", | |
"header" => "Content-Type: multipart/form-data; boundary=--foo\r\n", | |
"content" => "--foo\r\n" | |
. "Content-Disposition: form-data; name=\"myFile\"; filename=\"image.jpg\"\r\n" | |
. "Content-Type: image/jpeg\r\n\r\n" |
// snippet taken from http://catapulty.tumblr.com/post/8303749793/heroku-and-node-js-how-to-get-the-client-ip-address | |
function getClientIp(req) { | |
var ipAddress; | |
// The request may be forwarded from local web server. | |
var forwardedIpsStr = req.header('x-forwarded-for'); | |
if (forwardedIpsStr) { | |
// 'x-forwarded-for' header may return multiple IP addresses in | |
// the format: "client IP, proxy 1 IP, proxy 2 IP" so take the | |
// the first one | |
var forwardedIps = forwardedIpsStr.split(','); |
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
utc_to_local.py | |
Example of converting UTC to local time using python-dateutil. | |
https://pypi.python.org/pypi/python-dateutil | |
""" | |
from datetime import datetime |
<?php | |
/** | |
* Extended Walker class for use with the | |
* Twitter Bootstrap toolkit Dropdown menus in Wordpress. | |
* Edited to support n-levels submenu. | |
* @author johnmegahan https://gist.github.com/1597994, Emanuele 'Tex' Tessore https://gist.github.com/3765640 | |
* @license CC BY 4.0 https://creativecommons.org/licenses/by/4.0/ | |
*/ | |
class BootstrapNavMenuWalker extends Walker_Nav_Menu { |
$ ./manage.py shell | |
Python 2.7.5 (default, Aug 25 2013, 00:04:04) | |
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
(InteractiveConsole) | |
>>> from followers.models import * | |
>>> john = User.objects.create_user('john', 'lennon@thebeatles.com', 'password') | |
>>> paul = User.objects.create_user('paul', 'mccartney@thebeatles.com', 'password') | |
>>> george = User.objects.create_user('george', 'harrison@thebeatles.com', 'password') | |
>>> ringo = User.objects.create_user('ringo', 'starr@thebeatles.com', 'password') |