Skip to content

Instantly share code, notes, and snippets.

@innocuo
innocuo / textureSwitcher.js
Last active August 28, 2020 14:26
how to create 2 materials in PSV
//store materials in global vars
var panorama_default;
var panorama_hover;
//photosphereviewer has a renderer. The renderr uses a mesh (a sphere)
//the sphere has a material, and the material has a texture.
//we store one material
panorama_default = PSV.renderer.mesh.material.clone();
@innocuo
innocuo / AddUV
Last active February 25, 2022 07:32
How to create a rigged humanoid character using Clayxels and Puppet3D.
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
public class AddUV : MonoBehaviour
{
public Mesh mesh;
void Awake()

User support

The Joplin Forum is the community driven place for user support, general discussion about Joplin, problems with installation, new features and software development questions. It is possible to login with your GitHub account.

Reporting a bug

File bugs in the Github Issue Tracker. Please follow these guidelines:

  • Search existing issues first, make sure yours hasn't already been reported.
  • Don't use the issue tracker for support questions.
@innocuo
innocuo / disable_select_drag.css
Created May 16, 2019 16:02
disable text/image select and drag for electron apps
:not(input):not(textarea),
:not(input):not(textarea)::after,
:not(input):not(textarea)::before {
-webkit-user-select: none;
user-select: none;
cursor: default;
}
input, button, textarea, :focus {
outline: none; // You should add some other style for :focus to help UX/a11y
}
//p5 js example
function setup() {
createCanvas(200, 100);
frameRate(24);
}
let angle = 0;
let sin1 = 0;
let sin2 = 0;
let angle_inc = .2;
@innocuo
innocuo / .bash_profile
Created July 9, 2018 16:40
Add this to .bash_profile to list all hosts from your .ssh/config file
#list all hosts in .ssh/config
#if you add an argument, it lists all hosts that contain that word
whatssh(){
if [[ $# -eq 0 ]]; then
grep -w -i "Host" ~/.ssh/config | sed 's/[Hh]ost//'
else
grep -i "^Host\s\+.*$1.*$" ~/.ssh/config | sed 's/[Hh]ost//'
fi
}
@innocuo
innocuo / analog_mic_draw.ino
Created May 17, 2018 04:11 — forked from ksasao/analog_mic_draw.ino
[M5Stack] mic input test (speaker noise suppressed) refer to https://gist.github.com/ksasao/485ffbccbf3c47ea9cb814d3484e85e0
#include <driver/adc.h>
#include <M5Stack.h>
const int _bufSize = 128;
int _buf[_bufSize]; // adc buffer for suppress speaker noise
int _pos = 0;
int _old = 0;
int _count = 0;
int _offset = 0;
@innocuo
innocuo / theme.liquid
Created April 12, 2017 23:32
Shopify, if home (home page, index, frontpage)
{% if template == 'index' %}
{% endif %}
@innocuo
innocuo / readme.md
Created March 30, 2017 22:55
How to hide the dock icon in xcode for a osx app

Hiding the Dock Icon

  1. Open Info.plist
  2. Add a new key "Application is agent (UIElement)"
  3. set its value to YES
@innocuo
innocuo / StructExample.swift
Created March 29, 2017 02:11
Example of using Struct and extension
struct StructExample{
let text: String
let author: String
static let all: [Quote] = [
StructExample(text:"Enjoy the little things", author:"me"),
StructExample(text:"The best is yet to come", author:"you"),
StructExample(text:"No excuses", author:"she"),
StructExample(text:"The master has failed more times than the beginner has even tried", author:"he"),
StructExample(text:"One day can change everything", author:"not me"),