Skip to content

Instantly share code, notes, and snippets.

@i5ar
i5ar / rename.py
Last active Sep 5, 2020
Rename DJI images
View rename.py
#!/usr/bin/env python3
# ________ ____ ____ _____ ___ ___
# / ___/ _ \/ __ \/ __ `/ __ `__ \/ _ \
# / / / __/ / / / /_/ / / / / / / __/
# /_/ \___/_/ /_/\__,_/_/ /_/ /_/\___/
"""
Replace a character from 'old' to 'new' at specific 'index'
@i5ar
i5ar / main.js
Created May 16, 2020
Update user field from email
View main.js
jQuery(document).ready(function($) {
$("input#user_email").keyup(function () {
console.log(this.value);
$("input#user_login").val(this.value.split('@')[0])
});
});
@i5ar
i5ar / index.html
Created Apr 10, 2020
Basic Routing with React Router
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Basic Routing</title>
<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
<script crossorigin src="https://unpkg.com/react-router-dom@5.1.2/umd/react-router-dom.min.js"></script>
@i5ar
i5ar / csvmkdir.py
Last active Jan 28, 2020
Make directories from a CSV file
View csvmkdir.py
#!/usr/bin/env python
# __ __
# ___________ ______ ___ / /______/ (_)____
# / ___/ ___/ | / / __ __ \/ //_/ __ / / ___/
# / /__(__ )| |/ / / / / / / < / /_/ / / /
# \___/____/ |___/_/ /_/ /_/_/|_|\____/_/_/
"""
Make directories from a CSV file.
@i5ar
i5ar / solarized.scss
Created Jun 15, 2019
Solarized (dark) theme for Noty
View solarized.scss
.noty_theme__solarized.noty_bar {
margin: 4px 0;
overflow: hidden;
border-radius: 2px;
position: relative;
.noty_body {
padding: 10px;
font-size: 14px;
text-shadow: 1px 1px 1px rgba(7, 54, 66, .1);
@i5ar
i5ar / README.rst
Last active Aug 11, 2019
Template language
View README.rst

Fox

Fox template language.

Features

What makes Fox template language special.

@i5ar
i5ar / __main__.py
Created May 2, 2019
Edit Intel HEX file
View __main__.py
from intelhex import IntelHex
from pathlib import Path
FILE_IN = Path('./in.hex')
FILE_OUT = Path('./out.hex')
# Open HEX file, replace a byte and save in a new HEX file.
# https://python-intelhex.readthedocs.io/en/latest/part2-2.html
ih = IntelHex()
@i5ar
i5ar / .eslintrc
Last active Jul 11, 2019
ESLint, stylelint Run Commands
View .eslintrc
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:jsx-a11y/recommended",
View HRO-TYPE-C-31-M-13-HandSoldering.kicad_mod
(module HRO-TYPE-C-31-M-13-HandSoldering (layer F.Cu) (tedit 5C4A23EB)
(fp_text reference J1 (at 0 -7.62) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value USB_C_Receptacle_USB2.0 (at 0 1.15) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start -4.475 1.975) (end 4.475 1.975) (layer F.Fab) (width 0.15))
(fp_line (start -4.475 1.975) (end -4.475 -4.55) (layer F.Fab) (width 0.15))
(fp_line (start 4.475 1.975) (end 4.475 -4.55) (layer F.Fab) (width 0.15))
@i5ar
i5ar / index.html
Created Dec 25, 2018 — forked from tmcw/index.html
d3.keybinding
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font:12px/20px 'Helvetica';
}
textarea, input {
width:100%;
height:20px;
margin:0;
You can’t perform that action at this time.