Skip to content

Instantly share code, notes, and snippets.

View nathakits's full-sized avatar
💭
Brewing craft beer

Nathakit Sae-Tan nathakits

💭
Brewing craft beer
View GitHub Profile
@nathakits
nathakits / README.md
Last active August 25, 2023 17:59
Creating a `.desktop` file in Ubuntu that launches a Python script

Creating a .desktop file in Ubuntu that launches a Python script

Here we will make two .desktop files that will launch Pupil Capture and Pupil Player.

Steps

  1. Right click on your desktop and create a new empty document.
  2. Set the document file type by Renaming the document that ends with .desktop
  3. Drag the document into a text editor and edit the document with the example code below

Note: Change the X-Icon-Path to the icon you want to use and Execpath to where Pupil Capturemain.py` is located on your machine (see example pupil.desktop for reference)

@nathakits
nathakits / README.md
Last active September 18, 2022 11:09
SVG Animation - animating a circle along an svg path

SVG Animation - animating a circle along an svg path

Support

@nathakits
nathakits / README.md
Last active November 23, 2016 09:11
SVG Animation - animating with css

SVG Animation - animating with css

Moludar

@nathakits
nathakits / README.md
Created November 23, 2016 09:10
SVG Animation - animating along path

SVG Animation - animating along path

Community

@nathakits
nathakits / git-alias.md
Last active December 25, 2018 04:15
Git command cheatsheet

Git Alias

Set an alias in git

git config --global alias.<command> "<git command>"

Example

@nathakits
nathakits / README.md
Last active June 28, 2017 03:15
NPM Cheatsheet
@nathakits
nathakits / ubuntu-powerline-install.md
Last active August 29, 2017 09:12
Powerline font install for Ubuntu 16.10 Raw

Install Powerline fonts Oh-My-Fish

If you're using Fish shell with OMF theme designed with Powerline fonts in mind, you'll need to install them on your machine. These are the most clear and cut-down instructions that I've found to work with Ubuntu 16.10 and all credit goes to petercossey's Ubuntu Powerline Install gist.

Get the font and config files

cd ~
@nathakits
nathakits / polymer.md
Last active January 12, 2018 08:27
Polymer - notes and challenges

Polymer

Challenges

Testing

Testing Polymer components

Markdown

Markdown component performance on Polymer project

@nathakits
nathakits / header-walker.js
Created January 13, 2020 05:47
Used to find matching header in vue files
const fs = require('fs');
const glob = require('glob');
const fileType = 'pages/**/*.vue';
glob(fileType, function (err, files) {
files.forEach(file => {
const data = fs.readFileSync(file, 'utf8');
const matchH1 = data.match(/h1/g);
if (matchH1) {