Skip to content

Instantly share code, notes, and snippets.

Mardix mardix

Block or report user

Report or block mardix

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mardix / relift-example-stars-wars-simple.html
Last active Apr 21, 2019
View relift-example-stars-wars-simple.html
<div class="row">
<div class="column" id="starWarsWidget">
<div class="center">
<span r-if="(this.loadingStatus === 'pending')">
<div class="spinner">Loading...</div>
<h4 r-else>Welcome to Star Wars</h4>
mardix / relift-example-todo.html
Last active Apr 19, 2019
View relift-example-todo.html
<div class="column" id="todoAppWidget" style="display:none">
<div class="center">
<div>Enter your item</div>
<input type="text" id="todo-input" />
<button @click="add">Save</button>
<li r-for="item,i in this.todos">
mardix / relift-example-counter.html
Last active Apr 19, 2019
View relift-example-counter.html
<div class="column center" id="counterWidget">
<button @click="down" class="button-outline">DOWN</button>
<button @click="up" class="button-outline">UP</button>
View gist:c96e1ce96ba0f544d7dd21b50867d91f
## Create virtualenv
> mkvirtualenv $name
> workon $name
## Develop
To install
> python develop
View generateTemplateString.js
* Produces a function which uses template strings to do simple interpolation from objects.
* Usage:
* var makeMeKing = generateTemplateString('${name} is now the king of ${country}!');
* console.log(makeMeKing({ name: 'Bryan', country: 'Scotland'}));
* // Logs 'Bryan is now the king of Scotland!'
var generateTemplateString = (function(){
mardix / DOMClass.js
Created Dec 8, 2018 — forked from Maksims/DOMClass.js
HTMLElement extension to add, remove, toggle, detect Classes.
View DOMClass.js
HTMLElement = typeof(HTMLElement) != 'undefiend' ? HTMLElement : Element;
HTMLElement.prototype.addClass = function(string) {
if (!(string instanceof Array)) {
string = string.split(' ');
for(var i = 0, len = string.length; i < len; ++i) {
if (string[i] && !new RegExp('(\\s+|^)' + string[i] + '(\\s+|$)').test(this.className)) {
this.className = this.className.trim() + ' ' + string[i];
mardix / python_over_ssh
Created Mar 21, 2017 — forked from mattyjones/python_over_ssh
Execute a script located on a remote server over ssh using python
View python_over_ssh
#! /usr/bin/env python
import secure
import pexpect
# the file containing the list of servers to log into
input_file = "script_list"
# The login creds
user = secure.USER
View frontmatter example python
import frontmatter
from frontmatter import Post as FMPost
def frontmatter_to_file(file, data={}, content=""):
p = FMPost(content=content, **data)
with open(file, "w") as f:
mardix / .vscode-settings.json
Last active Mar 30, 2017
My VSCode Settings
View .vscode-settings.json
"python.pythonPath": "/Users/Mardix/.virtualenvs/${workspaceRootFolderName}/bin/python"
# Allow to create pages for testing purposes
from datetime import datetime
import random
import string
import shutil
import os
def generateWord():
You can’t perform that action at this time.