Skip to content

Instantly share code, notes, and snippets.

@font-face {
font-family: "icons";
src: url('../../../_base/fonts/icons-30f2a7f425.eot');
src: url('../../../_base/fonts/icons-30f2a7f425.eot?#iefix') format("embedded-opentype"), url('../../../_base/fonts/icons-75aee28852.woff') format("woff"), url('../../../_base/fonts/icons-be998e256a.ttf') format("truetype"), url('../../../_base/fonts/icons-a92642f18c.svg?#icons') format("svg");
font-weight: normal;
font-style: normal;
}
.pask {
font-size: 25px;
line-height: 1em;
import re
phrase = "we are ______,______ and ___"
names = ["John", "Paul", "Ringo"]
re.sub(r'(_)\1{2,}', something, phrase)
"we are John,Paul and Ringo"
[
{
"id": 123,
"name": "Pablo",
"username": "pleasedontbelong",
"imageUrl": "https://avatars0.githubusercontent.com/u/1785603?s=460&v=4",
"description": ""
},
{
"id": 124,
### Keybase proof
I hereby claim:
* I am pleasedontbelong on github.
* I am pleasedontbelong (https://keybase.io/pleasedontbelong) on keybase.
* I have a public key whose fingerprint is 0462 352B 2233 09DC 81E8 2399 A70D C897 7FFA 7B7B
To claim this, I am signing this object:
@pleasedontbelong
pleasedontbelong / swagger.json
Created April 12, 2016 21:41
Swagger example for the meetup slides
{
"swagger": "2.0",
"info": {
"description": "This is a sample server API server",
"version": "1.0.0",
"title": "Swagger Sample Api",
"contact": {
"name": "API Team",
"url": "http://wordnik.com",
"email": "apiteam@wordnik.com"
{
"sitemaps": [{
"url": "http://vivomaissaudavel.com.br/sitemap/main.xml",
"file_type": "SITEMAP_XML",
"invalid_urls": 0,
"sitemap_indexes": ["http://vivomaissaudavel.com.br/sitemap/index.xml"],
"valid_urls": 115
}, {
"url": "http://vivomaissaudavel.com.br/sitemap/categorias.xml",
"file_type": "SITEMAP_XML",
@pleasedontbelong
pleasedontbelong / views.py
Created August 12, 2015 08:55
Example of views for rest swagger 2.0
# you must import it even if not used because the introspector of rest
# swagger will try to load the serializer class from the docstring
from user import serializers as user_serializers
class UserListCreateView(generics.ListCreateAPIView):
permission_classes = (IsAuthenticated,)
queryset = User.objects.all()
def get(self, request, *args, **kwargs):
"""
{"info":{"contact":"apiteam@wordnik.com","description":"This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.wordnik.com\">http://swagger.wordnik.com</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters","title":"Swagger Sample App"},"paths":{"/{version}/analyses/{crawl_id}/features/pagerank/lost":{"parameters":[{"paramType":"path","required":true,"type":"string","name":"version"},{"paramType":"path","required":true,"type":"string","name":"crawl_id"}],"get":{"description":"<p>Fetch a static file from S3 with a JSON representation or a TSV\nGunzip it if necessary</p>","produces":["application/json","text/html"],"type":"object","operationId":"Crawl_Static_File_GET","externalDocs":"TODO","tags":"TODO","summary":"Fetch a static file from S3 with a JSON representation or a TSV"}},"/{version}/analyses/{username}/{project_slug}/{crawl_slug}/features/top_domains/domains/":{"parameters":[{"pa
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Botify Analytics",
"description": "Botify Analytics POC",
"contact": {
"name": "Botify Team",
"url": "https://botify.com",
"email": "tech@botify.com"
@pleasedontbelong
pleasedontbelong / habtm_structure
Created January 27, 2014 12:49
cakephp habtm and validator array structure
Array
(
[Post] => Array
(
[name] => my test post
)
[Tag] => Array
(
[Tag] => Array
(