Skip to content

Instantly share code, notes, and snippets.

@emoryy
emoryy / block.it
Last active May 20, 2023 06:47
block
[Adblock Plus 2.0]
! Version: 1
! Title: Ixian's list
! Expires: 3 days
! Homepage: https://gist.github.com/emoryy/7610203638ea76401a81b50fa3c9ffa2
! Last modified: 17 May 2023 09:00 UTC
! GLOBAL RULES
!
order.mandarake.co.jp##.chead
@emoryy
emoryy / vivaldi-custom.css
Created December 26, 2022 09:41
vivaldi-custom.css
/* multiline tabs */
#tabs-tabbar-container {
height: auto !important;
}
#tabs-tabbar-container.top {
padding-top: 0;
}
@emoryy
emoryy / day16-1.js
Last active December 28, 2021 21:41
Advent of Code 2021
(function() {
'use strict';
const hexa = document.body.firstChild.textContent;
const input = hexa.match(/\w/g).map(num => Number.parseInt(num,16).toString(2).padStart(4,'0')).join('').split('');
console.log("input", input.length, input.join(''));
let pos = 0;
let versionSum = 0;
function dec(bits) {
return Number.parseInt(bits, 2)
}
@emoryy
emoryy / components.ext-component.js
Last active February 12, 2019 15:39
ConcatenatedProblem
import MyComponent from './my-component';
export default MyComponent.extend({
x: 'extended',
y: 'extended',
z: 'extended',
classNames: 'extended',
internalProperty: "internal",
@emoryy
emoryy / components.my-component.js
Last active February 12, 2019 14:10
InboundActions - concatenatedProperties
import Ember from 'ember';
import InboundActions from 'ember-component-inbound-actions/inbound-actions';
export default Ember.Component.extend(InboundActions, {
concatenatedProperties: ['x'],
x: ['A'],
classNames: ['A'],
@emoryy
emoryy / styles.less
Created March 12, 2018 08:47
Atom custom style for Atom Dark / Neon
atom-text-editor, atom-text-editor {
// color: #71787c;
color: #aaa;
}
.scroll-view {
// -webkit-font-smoothing: none !important;
// font-family: Unscii-Mod;
// font-size: 17px;
@emoryy
emoryy / arduino-blinkt.ino
Created November 9, 2017 12:25
Arduino Blinkt!
#include <Adafruit_DotStar.h>
#include <SPI.h>
#define NUMPIXELS 8 // Number of LEDs in strip
// Here's how to control the LEDs from any two pins:
#define DATAPIN 4
#define CLOCKPIN 5
Adafruit_DotStar strip = Adafruit_DotStar(NUMPIXELS, DATAPIN, CLOCKPIN, DOTSTAR_BGR);
@emoryy
emoryy / response.json
Created November 8, 2017 08:44
Kérés: GET /api/HammyQueryAPI/messages?limit=5&offset=15
{
"data": [
{
"type": "messages",
"id": "16",
"attributes": {
"properties": [],
"html-body": "\n<html>\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n <title></title>\n <style type=\"text/css\">\n /* Client-specific Styles */\n #outlook a{padding:0;} /* Force Outlook to provide a \"view in browser\" button. */\n body{width:100% !important;} .ReadMsgBody{width:100%;} .ExternalClass{width:100%;} /* Force Hotmail to display emails at full width */\n body{-webkit-text-size-adjust:none;} /* Prevent Webkit platforms from changing default text sizes. */\n /* Reset Styles */\n body{margin:0; padding:0;}\n img{border:0; height:auto; line-height:100%; outline:none; text-decoration:none;}\n table td{border-collapse:collapse;}\n #backgroundTable{height:100% !important; margin:0; padding:0; width:100% !important;}\n /* Template Styles */\n /* ////////// STANDARD STYLING: COMMON PAGE
@emoryy
emoryy / arduino-unicorn-hat-hd.ino
Created November 4, 2017 15:45
Arduino Unicorn HAT HD
#include <SPI.h>
const int slaveSelectPin = D8;
uint8_t buffer[16][16][3] = { 0 };
unsigned long step = 0;
//------------------demos------------------------
void gradient(uint8_t x, uint8_t y, unsigned long step) {
@emoryy
emoryy / skydraw.py
Created September 5, 2017 17:54
Skywriter test
from curses import wrapper
from curses.textpad import Textbox, rectangle
import skywriter
import time
import signal
from threading import Thread
w = 80
h = 38