Skip to content

Instantly share code, notes, and snippets.

@Med116
Med116 / dexergon64.json
Created April 17, 2023 22:04
via json file to load with usevia.app website
{
"name": "dexergon64",
"vendorId": "0x3030",
"productId": "0x0000",
"lighting": "qmk_backlight_rgblight",
"matrix": {"rows": 4, "cols": 16},
"layouts": {
"keymap": [
["0,0","0,1","0,2","0,3","0,4","0,5",{"x":0.5},"0,6","0,7","0,8","0,9","0,10","0,11","0,12",{"w":2},"0,13",{"x":0.5},"0,14","0,15","3,15"],
[{"w":1.5},"1,0","1,1","1,2","1,3","1,4","1,5",{"x":0.75},"1,6","1,7","1,8","1,9","1,10","1,11",{"w":2.25},"1,12",{"x":0.5},"1,13","1,14","1,15"],
{
"name": "dexergon64",
"vendorProductId": 808452096,
"macros": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],
"layers": [
[
"KC_ESC",
"KC_Q",
"KC_W",
"KC_E",
@Med116
Med116 / Col
Last active August 21, 2019 02:42
java jx git gui code Main
package sample;
public class DBColumn implements DBItem {
private String columnName;
private String columnTypeName;
private int columnType;
private boolean primaryKey;
import { Component, OnInit } from '@angular/core';
import { Observable } from 'rxjs';
@Component({
selector: 'app-one',
template: `<ol>
<li *ngFor="let planet of planets$ | async"> {{ planet }} </li>
</ol>
`,
styleUrls: ['./one.component.css']
@Med116
Med116 / pebbe time colors
Created June 26, 2015 19:34
pebble colors java code
var color_picker_colors = {
"#AAFFAA": {
"dist": 25.45584412271571,
"closest": {
"url": "http://en.wikipedia.org/wiki/Spring_green_(color)#Mint_green",
"r": 152,
"b": 152,
"name": "Mint green",
"g": 255
},
@Med116
Med116 / array2groupedobject.js
Created July 22, 2014 21:13
takes in ar array of strings, and returns a grouped object
module.exports = function(arr,callback){
var groupByObj = {};
if(arr.length == 0){
callback(groupByObj);
}
var count = 0;
arr.forEach(function(val){
@Med116
Med116 / mailgunner.js
Created July 22, 2014 20:30
sends email via mailgun api
var MailGun = function(configObj){
var mailgunKey = process.env.MAILGUN_KEY || configObj.apiKey;
this.auth = "api:" + mailgunKey;
this.hostname = "api.mailgun.net";
this.toArray = [];
this.text = "default text";
this.html = "";
this.subject = configObj.subject || "No Subject";
this.from = configObj.from || "";
this.domain = configObj.domain;
@Med116
Med116 / ajax.js
Created May 7, 2014 18:23
ajax javascript get
function getAjax(){
var xmlhttp;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
@Med116
Med116 / layout.js
Created May 2, 2014 20:12
little router and server for node
module.exports = function(title, content){
var zm = require("zm").zm;
var html = new zm.BaseTag().tag("html");
var head = new zm.BaseTag().tag("head");
head.addContent(new zm.BaseTag().tag("link").setAttr("href", "style.css").setAttr("type", "text/css").setAttr("rel","stylesheet"));
html.addContent(head);
var body = new zm.BaseTag().tag("body");
// here is where content is injected
body.akon(new zm.Div(content).setAttr("id","main"));
@Med116
Med116 / base_tag.js
Last active August 29, 2015 14:00
js base tag
/*
* ZML: Zero Markup Language dot js
* This script defines BasrTag function that
* parents all html tags. "<div>" being the default tag
* Author: Mark Davis
*/
var Zm = {
Utils : {
appendToBody: function(zm_content){