Skip to content

Instantly share code, notes, and snippets.

icron /
Created Dec 27, 2014
Build your VPN in one click
echo "Select on option:"
echo "1) Set up new PoPToP server AND create one user"
echo "2) Create additional users"
read x
if test $x -eq 1; then
echo "Enter username that you want to create (eg. client1 or john):"
read u
echo "Specify password that you want the server to use:"
read p
icron / foo.log
Last active Aug 29, 2015 — forked from ibeex/foo.log
View foo.log
A warning occurred (42 apples)
An error occurred
View ajax.js
* IE 5.5+, Firefox, Opera, Chrome, Safari XHR object
* @param string url
* @param object callback
* @param mixed data
* @param null x
function ajax(url, callback, data, x) {
try {
View main.js
// JST and HAML Assets is used for the templating pre-compilation
Backbone.Marionette.Renderer.render = function(template, data) {
if (!JST[template]) {
throw "Template '" + template + "' not found!";
return JST[template](data);
window.MyApp = new Backbone.Marionette.Application();
View regex-email
(?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t]
)+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:
\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(
?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[
\t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\0
31]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\
](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+
(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:
(?:\r\n)?[ \t])*))*|(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z
|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)
icron / JXA
Created Mar 16, 2018 — forked from JMichaelTX/JXA
JavaScript for Automation (JXA) Resources
View JXA

JXA Resources

Revised: 2017-06-24 11:21 PM CT


This page has been transferred to JXA Resources in the JXA Wiki of All further updates will be made there, and this GitHub Gist page will eventually be removed.


This is a list of the key resources I have found useful. If you know of others, please post in a comment below, and I will add to this list.

icron /
Last active Feb 9, 2021
Flask-Admin Export CSV
from flask import send_file
from pandas import DataFrame
class MyModelView(ModelView):
def export(self):
# Grab parameters from URL
page, sort_idx, sort_desc, search, filters = self._get_list_extra_args()
sort_column = self._get_column_by_idx(sort_idx)
if sort_column is not None:
sort_column = sort_column[0]