Skip to content

Instantly share code, notes, and snippets.

View feiss's full-sized avatar

Diego F. Goberna feiss

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Shooter</title>
<script src="aframe.min.js"></script>
<script src="shooter.js"></script>
<script src="aframe-event-set-component.min.js"></script>
</head>
<body>
@feiss
feiss / copy-selection-coordinates.py
Last active March 24, 2021 22:00
GIMP plugin in Python for copying current selection coordinates to clipboard
#!/usr/bin/python
from gimpfu import *
import os
def plugin_main(timg, tdrawable):
non_empty, x1, y1, x2, y2 = pdb.gimp_selection_bounds(timg)
if (non_empty):
os.system('echo {}, {}, {}, {} | xsel --clipboard'.format(x1, y1, x2 - x1, y2 - y1))
else:
os.system('echo "no selection" | xsel --clipboard')
AFRAME.registerComponent('gifcapture', {
schema: {
width: {default: 200},
height:{default: 200},
fps: {default: 15},
duration: {default: 3 },
delay: {default: 0},
jsPath: {default: './vendor/'},
@feiss
feiss / triangle.gltf
Created November 8, 2016 00:16
triangle.gltf exported from blender
{
"accessors": {
"Plane_buffer_accessor_0": {
"bufferView": "Plane_buffer_view_0",
"byteOffset": 0,
"byteStride": 24,
"componentType": 5126,
"count": 3,
"max": [
1.0,
# usage:
# save this gist in a file call cdd.sh1
# then, add a shortcut in the desktop or taskbar with the target:
# C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command "& <full path to cdd.ps1>"
#
# When executed, type the folder name where you want to jump. Write "scan" if you want to refresh folder cache
$folder = Read-Host ' '
if ($folder -eq 'scan'){
@feiss
feiss / doc.py
Last active October 21, 2015 16:45
Very simple and basic documentation generator
# -*- coding: utf-8 -*-
import sys
import re
def main():
if len(sys.argv) < 2:
print 'specify input file'
exit(1)