Skip to content

Instantly share code, notes, and snippets.

View oligoform's full-sized avatar

Oliver Bunke oligoform

View GitHub Profile
@oligoform
oligoform / FileReader.md
Created September 30, 2022 08:12 — forked from burkeholland/FileReader.md
Reading A Local JSON File With NativeScript

In NativeScript, the http module doesn't currently support making network requests to the local file system. That work is intended to be done by the file reader. It's pretty simple to read a local file and parse its contents as JSON.

This is the TypeScript/Promise version of what Emil Oberg created for the same question on StackOverflow. This module should be reusable for any and all asyncronous local JSON read operations.

import * as fs from 'file-system';

var documents = fs.knownFolders.currentApp();

class FileReader {
@oligoform
oligoform / repos.json
Created September 23, 2022 10:45 — forked from kingschnulli/repos.json
Oxid eShop GPL Version repositories
[
{
"type": "vcs",
"url": "https://www.github.com/oxid-eshop-gpl/mobile_theme"
},
{
"type": "vcs",
"url": "https://www.github.com/oxid-eshop-gpl/oxideshop_ce"
},
{
@oligoform
oligoform / splice-object-array.js
Created May 13, 2022 05:17 — forked from scottopolis/splice-object-array.js
Remove object from array of objects in Javascript
// we have an array of objects, we want to remove one object using only the id property
const apps = [{id:34,name:'My App',another:'thing'},{id:37,name:'My New App',another:'things'}];
// get index of object with id of 37
const removeIndex = apps.findIndex( item => item.id === 37 );
// remove object
apps.splice( removeIndex, 1 );
@oligoform
oligoform / README.md
Created November 24, 2021 22:00 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@oligoform
oligoform / volumetric-clouds.glsl
Created June 1, 2021 09:11 — forked from dolanor/volumetric-clouds.glsl
Volumetric clouds GLSL webGL
// Created by inigo quilez - iq/2013
// License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
// Volumetric clouds. It performs level of detail (LOD) for faster rendering
float noise( in vec3 x )
{
vec3 p = floor(x);
vec3 f = fract(x);
f = f*f*(3.0-2.0*f);
@oligoform
oligoform / README.md
Created October 16, 2020 08:48 — forked from jagdeepsingh/README.md
Set up macOS Catalina 10.15 with development tools
@oligoform
oligoform / simple-pods-plugin.php
Created July 7, 2020 13:47 — forked from Shelob9/simple-pods-plugin.php
Simple plugin for safely adding code for extending Pods. Instructions: 1) Create a folder in your plugins file. 2) Add this file and a second file, called 'custom-code.php' to it. 3) Add custom code to custom-code.php. 4) Activate plugin. For a complete Pods plugin starter plugin, see: https://github.com/pods-framework/pods-extend
<?php
/*
Plugin Name: Pods Starter Plugin
Version: 0.0.1
License: GPL v2 or later
*/
//note: change 'slug' to your own custom prefix.
add_action( 'plugins_loaded', 'slug_extend_safe_activate');
function slug_extend_safe_activate() {
@oligoform
oligoform / ESP32_HID.ino
Created April 8, 2020 10:56 — forked from sabas1080/ESP32_HID.ino
Example of HID Keyboard BLE with ESP32
/*
Copyright (c) 2014-2020 Electronic Cats SAPI de CV. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@oligoform
oligoform / remove_style.js
Created February 6, 2020 15:58 — forked from nathansmith/remove_style.js
Remove inline styles
/*
Remove inline style="..."
Preserve hidden content.
Call the function like this:
var all = document.getElementsByTagName('*');
remove_style(all);
@oligoform
oligoform / jquery.inlineStyleFilter.js
Created February 6, 2020 14:27 — forked from corbanbrook/jquery.inlineStyleFilter.js
jQuery :inlineStyle selector filter extention
/**
:inlineStyle filter
An inline style selector filter.
Usage: $("div:inlineStyle(display:none)"); // returns any divs with display style set to none
$("div:inlineStyle(width)"); // returns any divs with a width style set
$("div:inlineStyle"); // returns any divs with an inline style set
Written by Corban Brook @corban