Skip to content

Instantly share code, notes, and snippets.

View zfedoran's full-sized avatar

zfedoran

View GitHub Profile
@zfedoran
zfedoran / urls.js
Last active April 20, 2021 10:55
Basic URL handler with query param support
// Example urls.js file for a Vue or React project
// -------------------------------------------------------------------------------------
// URLs.js
// -------------------------------------------------------------------------------------
/*
* Get the url query parameters from the current URL in the address bar
*/
function get_url_params() {
@zfedoran
zfedoran / tflearn-example-sine-function.py
Created June 29, 2017 21:44
Basic DNN Example: Approximate sine function using tflearn
import tflearn
import numpy as np
import matplotlib.pyplot as plt
N = 1000
# Approximate sine function using tflearn
x = np.linspace(-np.pi, np.pi, N)
y = np.sin(x) + np.random.uniform(-0.5,0.5, N)
@zfedoran
zfedoran / simple-vuejs-example.html
Created May 2, 2016 18:24
Simple Vue.js Example (no build tools)
<!-- Live Example: https://jsfiddle.net/Lqn6ocqm/ -->
<component>
<style>
.zelimir div {
background: #0ff;
}
</style>
<template>
@zfedoran
zfedoran / vu.js
Last active March 31, 2017 20:42
Vu.js - Tiny Front-end Framework
// Vu.js v0.9000.1 Library
/* (Please don't use this, created as a joke) */
/* Live Example: https://jsfiddle.net/ya76bu7b/3/ */
class Vu {
constructor(config) {
this.$el = document.querySelector(config.el);
set nocompatible
"install pathogen
"git clone nerdtree, auto-pairs
call pathogen#infect()
syntax on
"set nu
set ts=2
@zfedoran
zfedoran / gist:2356736
Created April 11, 2012 03:55
[vim] skip over closing parenthesis with tab button
inoremap <expr> <Tab> SkipClosingParentheses()
function! SkipClosingParentheses()
let line = getline('.')
let current_char = line[col('.')-1]
"Ignore EOL
if col('.') == col('$')
return "\t"
end