Skip to content

Instantly share code, notes, and snippets.

@mpecka
mpecka / ExcelRemoveAccents.vb
Last active April 22, 2024 16:40
Excel Remove Accents
Function StripAccent(thestring As String)
Dim A As String * 1
Dim B As String * 1
Dim i As Integer
Const AccChars= "áäčďéěíĺľňóôőöŕšťúůűüýřžÁÄČĎÉĚÍĹĽŇÓÔŐÖŔŠŤÚŮŰÜÝŘŽ"
Const RegChars= "aacdeeillnoooorstuuuuyrzAACDEEILLNOOOORSTUUUUYRZ"
For i = 1 To Len(AccChars)
A = Mid(AccChars, i, 1)
B = Mid(RegChars, i, 1)
thestring = Replace(thestring, A, B)
@braian87b
braian87b / sqm-openwrt-lede.sh
Created July 11, 2017 12:55
Enable SQM for OpenWRT / LEDE
Important: you should use values at around 95% of speedtest or 85% of ISP advertised speed.
# using luci:
opkg update; opkg install luci-app-sqm
# without luci:
opkg update
opkg install sqm-scripts
@juzam
juzam / wifi_positioning_system.py
Created January 8, 2017 11:56 — forked from initbrain/NOTICE.md
Python Wi-Fi Positioning System, use Google Maps Geolocation API, tested on GNU/Linux (require iw) and Mac OS X (require airport), special thanks go to contributors!
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Julien Deudon (initbrain) - 20/03/2012
# modified to run on OS X by James Armitage - 25/06/2012
# modified to process in python by Dan Gleebits - 26/06/2012
# modified to parse the xml output of airport by Vincent Ohprecio - 01/10/2012
# modified to work with the new Google geolocation API by Giovanni Angoli (juzam) - 03/01/2017
# merging all modifications by Julien Deudon (initbrain) - 06/01/2017
from commands import getoutput, getstatusoutput
@jlxw
jlxw / index.html
Created October 7, 2016 02:51
Parsley 2.5 and Bootstrap 4
<script src='https://cdnjs.cloudflare.com/ajax/libs/parsley.js/2.5.0/parsley.min.js'></script>
<script>
Parsley.options.errorClass = 'has-danger'
Parsley.options.successClass = 'has-success'
Parsley.options.classHandler = function(f) { return f.$element.closest('.form-group'); }
Parsley.options.errorsWrapper = '<div class="form-control-feedback"></div>'
Parsley.options.errorTemplate = '<div></div>'
</script>
@doobeh
doobeh / home.html
Created January 19, 2016 14:04
More complete example of FieldList with FormField
<form method="post" action="">
{{ form.name}}
{{ form.hidden_tag() }}
<br/>
{% for entry in form.hours %}
{{ loop.index0|dow }}
{{ entry() }}
{% endfor %}
<input type="submit"/>
</form>
@kageurufu
kageurufu / flask.py
Created October 3, 2013 17:42
Flask-WTF FieldLists with Dynamic Entries
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.wtf import Form
from flask.ext.babel import gettext
from wtforms import SelectField, TelField, TextField, FormField, Fieldlist, SubmitField
from wtforms.validators import Optional, Required
app = Flask(__name__)
db = SQLAlchemy(app)
@doobeh
doobeh / example.html
Last active June 8, 2023 18:09
Checkbox WTForms Example (in Flask)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<form method="post">
{{ form.hidden_tag() }}
{{ form.example }}
@ibeex
ibeex / foo.log
Created August 4, 2012 13:46
Flask logging example
A warning occurred (42 apples)
An error occurred