Skip to content

Instantly share code, notes, and snippets.

@opencoca
opencoca / node_setup.sh
Last active December 31, 2020 23:38
Setup the latest Node, NPM, and Yarn on a Debian based system
sudo apt-get install gcc g++ make && sudo apt-get install -y nodejs && curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list && sudo apt-get update && sudo apt-get install yarn
@opencoca
opencoca / index.html
Last active November 19, 2020 20:04
Video Recording Test
<h1><a href="//webrtc.github.io/samples/" title="WebRTC samples homepage">WebRTC samples</a>
<span>MediaRecorder</span></h1>
<p>For more information see the MediaStream Recording API <a
href="http://w3c.github.io/mediacapture-record/MediaRecorder.html"
title="W3C MediaStream Recording API Editor's Draft">Editor's&nbsp;Draft</a>.</p>
<video id="gum" playsinline autoplay muted></video>
<video id="recorded" playsinline loop></video>
var localMessages = {};
document.getElementById('comments')
.innerHTML = `<div id="commentInput">
<input id="commentName" type="text" placeholder="Little Learner"><br/>
<textarea id="commentMessage" placeholder="Your message here"></textarea><br/>
<button onclick="submitComment(this)">Submit Comment</button></div>
<div id="commentList"></div>`;
function getComments() {
console.log('getting messages')
// title : keyboard
// author : Joost Nieuwenhuijse
// license : MIT License
// description: a lamp shade
// file : lamp-shade.jscad
function main (params) {
CSG.defaultResolution2D = (params.quality === 'DRAFT') ? 8 : 32;
var bottomradius = params.bottomdiameter / 2;
@opencoca
opencoca / index.html
Created June 24, 2020 12:23
Subheader @click bug
<div id="app">
<v-app id="inspire">
<v-layout row>
<v-flex xs12 sm6 offset-sm3>
<v-card>
<v-toolbar color="teal" dark>
<v-toolbar-title>Manage</v-toolbar-title>
<v-spacer></v-spacer>
@opencoca
opencoca / index.html
Created June 13, 2020 17:10
Web Torrent
<section class="section">
<div class="container ">
<nav class="navbar columns">
<p class="column has-text-centered">
<a class="link is-info" href="#">Home</a>
</p>
<p class="column has-text-centered">
<a class="link is-info" href="#">Menu</a>
</p>
<p class="column has-text-centered">
! function() {
for (var e = function(e) {
var t;
return function(r) {
return t || e(t = {
exports: {},
parent: r
}, t.exports), t.exports
}
}, t = e(function(e, t) {
@opencoca
opencoca / mautic_warmup.sh
Created March 18, 2020 13:36
Mautic Perms and Cache warm up
cd /var/www/mautic
mkdir app/spool/
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
chmod -R g+w app/cache/
chmod -R g+w app/logs/
chmod -R g+w app/config/
chmod -R g+w media/files/
chmod -R g+w media/images/
chmod -R g+w translations/
#Copyright Alexander Somma
#Licensed under GPL
#taken from https://nosarthur.github.io/coding/2018/01/15/termux.html
#Before running install curl
#pkg install curl
#then call using: curl -fsSL
termux-setup-storage# it creates a folder called storage at your home folder which provides access to the Chromebook file systems (downloads, music, pictures, etc)
pkg install termux-exec# for better support for bash