Skip to content

Instantly share code, notes, and snippets.

@X-Wei
X-Wei / sliver_appbar_with_tabs.dart
Created July 29, 2018 11:36
Demo of using SliverAppbar with tabs.
// Sliver appbar with tabs.
// Adapted from: https://stackoverflow.com/a/50858058
import 'package:flutter/material.dart';
void main() => runApp(MaterialApp(
home: SilverAppBarWithTabBarScreen(),
));
class SilverAppBarWithTabBarScreen extends StatefulWidget {
//windows
netsh wlan show profile name="nombre-red" key=clear
//mac
security find-generic-password -ga vodafone7f5d | grep password
@timprepscius
timprepscius / export_messages.py
Created July 7, 2016 19:14 — forked from hastyeagle/export_messages.py
Export iOS/iMessage chat logs to HTML or text
#!/usr/bin/env python
import sys, getopt
import urllib
import urlparse
import base64
import mimetypes
import cgi
import sqlite3
import os
# crear pagina
ionic g page login
# un component es una piea de código que podremos usar en cualquier parte de nuestra aplicacion
ionic g component myComponent
# Una directive es un modificador de atributos que podemos usar en cualquier elemento de nuestra aplicación
ionic g directive myDirective
@ejherran
ejherran / qrzip.py
Created June 14, 2016 18:18
Generar multiples códigos QR en formato PDF, comprimir el contenido en un fichero ZIP y descargarlo en modo web con DJango - Python 3
# -*- coding: utf-8 -*-
# Python 3.5
# Django 1.9.7
from reportlab.pdfgen import canvas
from reportlab.graphics.shapes import Drawing
from reportlab.graphics.barcode.qr import QrCodeWidget
from reportlab.graphics import renderPDF
from io import BytesIO, StringIO
from zipfile import ZipFile, ZIP_DEFLATED
@thealexcons
thealexcons / jwt_golang_example.go
Last active April 16, 2023 03:04
JSON Web Tokens in Go
package main
import (
"io/ioutil"
"log"
"strings"
"net/http"
"encoding/json"
"fmt"
"time"
@benallard
benallard / xml_split.py
Last active April 24, 2025 20:36
Small python script to split huge XML files into parts. It takes one or two parameters. The first is always the huge XML file, and the second the size of the wished chunks in Kb (default to 1Mb) (0 spilt wherever possible) The generated files are called like the original one with an index between the filename and the extension like that: bigxml.…
#!/usr/bin/env python
import os
import xml.parsers.expat
from xml.sax.saxutils import escape
from optparse import OptionParser
from math import log10
# How much data we process at a time
@pebreo
pebreo / django-jquery-demo.py
Last active April 29, 2020 05:15
jQuery AJAX + Django SIMPLE DEMO
# views.py - django app called ajx
from django.shortcuts import render, get_object_or_404, redirect, HttpResponse, render_to_response, HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.contrib.auth import authenticate, login
import json
def mygetview(request):
if request.method == 'GET':