Skip to content

Instantly share code, notes, and snippets.

@i5ar
i5ar / vi-mode-agnoster.plugin.zsh
Last active June 30, 2019 10:32
Vi mode plugin for Agnoster Zsh theme
# vi mode agnoster Plugin
# A Powerline-inspired plugin for Agnoster theme
#
# # README
#
# In order for this extension to work properly, you will need a
# [Agnoster-theme](https://gist.github.com/agnoster/3712874).
#
# # Goals
#
@i5ar
i5ar / solarized.scss
Created June 15, 2019 08:30
Solarized (dark) theme for Noty
.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);
(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 / Vagrantfile
Last active May 18, 2019 20:44
CentOS 7 setup
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@i5ar
i5ar / __main__.py
Created May 2, 2019 22:42
Edit Intel HEX file
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 / recover.c
Last active January 28, 2019 04:43 — forked from jcoryalvernaz/recover
Recover card
#include <stdio.h>
#include <stdbool.h>
int main(int argc, char *argv[])
{
// Make sure that I have one command line argument
if (argc != 2)
{
fprintf(stderr, "Usage: ./recover image\n");
@i5ar
i5ar / index.html
Created December 25, 2018 07:21 — forked from tmcw/index.html
d3.keybinding
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font:12px/20px 'Helvetica';
}
textarea, input {
width:100%;
height:20px;
margin:0;
@i5ar
i5ar / main.py
Last active December 22, 2018 13:53
Add an empty file to the Registry
import winreg
import ctypes
import os
keys = [
r'.dwg\ShellNew',
r'.3dm\ShellNew',
r'.blend\ShellNew']
@i5ar
i5ar / main.py
Last active November 25, 2018 21:37
Get data from DWG
import sys
import itertools
import pdb
def find_sentinel(file, sentinel):
counter = 0
pattern = []
for i in itertools.count():
buffer = file.read(1)
@i5ar
i5ar / heisenberg.iss
Last active November 4, 2018 09:34
A simple PDF utility for lazy teachers
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Heisenberg"
#define MyAppVersion "0.5"
#define MyAppExeName "heisenberg.exe"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.