Skip to content

Instantly share code, notes, and snippets.

@Asmageddon
Asmageddon / LonelinessMatters.md
Created Jul 8, 2021
Paper Digest: Loneliness Maters
View LonelinessMatters.md

Loneliness Matters: A Theoretical and Empirical Review of Consequences and Mechanisms https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3874845/ General info:

As a social species, humans rely on a safe, secure social surround to survive and thrive. Perceptions of social isolation, or loneliness, increase vigilance for threat and heighten feelings of vulnerability while also raising the desire to reconnect. Implicit hypervigilance for social threat alters psychological processes that influence physiological functioning, diminish sleep quality, and increase morbidity and mortality. [...] Loneliness is not simply being alone. Interventions to reduce loneliness and its health consequences may need to take into account its attentional, confirmatory, and memorial biases as well as its social and behavioral effects. [...] Loneliness is a common experience; as many as 80% of those under 18 years of age and 40% of adults over 65 years of age report being lonely at least sometimes [1–3], with levels of l

@Asmageddon
Asmageddon / kindness.md
Created Oct 15, 2019
How to be kind and helpful to oneself
View kindness.md
  1. Always be kind to yourself, and forgive yourself for failures. Even if you screw up badly or feel like you deserve it, not being kind to yourself only hurts you more, it doesn't ever help you, or anyone else, in any way. It's essentially camouflaged self-sabotage. Real attempts to get better don't end up with feeling worse for trying. Appreciate your success in trying to do something for yourself instead.

  2. Focus on noticing when you're starting to sink into intrusive or self-destructive thoughts, and on deflecting them whenever you can. Just think anything else. The opposite of what you're thinking, or generic compliments towards yourself. When you fail, and you will, refer to #1. The point is to slowly work on making your mind less likely to go down those routes, and dissociating your thoughts and actions from negative feelings and thoughts.

  3. Your thoughts and mind as a whole are there to help you succeed, whatever success means. The thoughts that lead to stress and other bad emotions, unless cri

@Asmageddon
Asmageddon / anime-recs.md
Last active Jul 27, 2020
Anime worth checking out
View anime-recs.md

Preface

Anyway, for a brief list in a very rough order of what I consider best, with stuff near the bottom of the list still being at the very least "Kinda decent".

I strongly apologize for not including links and some of the descriptions being vague, but that's halfway intentional(there are better synopses and reviews out there) and halfway because this already took damn ages.

I've marked every show with single-letter tags:

@Asmageddon
Asmageddon / scopecolor.lua
Created Sep 7, 2016
A buggy scope highlighter for ZeroBrane Studio
View scopecolor.lua
local golden_ratio = (1+math.sqrt(5))/2
local offset = 0.05
local function HSVtoRGB(h, s, v)
if s == 0 then
return v,v,v
end
h = h/60
i = math.floor( h )
f = h - i
View relative-require.lua
rawrequire = require
function require(path)
if string.sub(path, 1,1) == "." then
local root = (debug.getinfo(2, 'S')).source:sub(2);
root = root:gsub("/[^/]*$", ""):gsub("/", ".")
return rawrequire(root .. path)
else
return rawrequire(path)
end
end
View gist:ae55148bf06adc475dbc
// Syntax notes:
// Blah!Int is generic type application, equivalent to C++'s Blah<Int>
// Ptr!Type is a pointer to a Type object
// Type? is Option!Type, e.g. either a Type object, or None
// Semantics notes:
// struct is a C-style struct
// union is a typed union, e.g. union!(A, B) can be either A, or B, but not at the same time
// Type notes:
// Splashmap is a map with multiple key and value types, where keys map to only some of the types
// For example, in Splashmap!((A, A), (A, B), (B, B)):
@Asmageddon
Asmageddon / gist:a76d7938da3c0564631b
Last active Jul 4, 2016
Sandbox for markdown experimentation
View gist:a76d7938da3c0564631b

Header

Hello

print("hello")
a = a + b

Sub-header

  • Hello
@Asmageddon
Asmageddon / h3-type-system.md
Last active Aug 29, 2015
The type system of h3
View h3-type-system.md

Type system of h3(working name)

  1. Basic types:

Integer family:

Integer numbers. Includes:

  • Int - largest native signed integer type available on current architecture
  • Differently sized signed and unsigned integers
@Asmageddon
Asmageddon / Lua snippets
Last active Aug 29, 2015
Lua util functions - pretty-printing, defaultdict, etc.
View Lua snippets
Just some Lua snippets.
View Google Spreadsheets - Wolfram Alpha nutrition data
var WOLFRAM_KEY = "<API KEY GOES HERE>";
var local_cache = {};
function wolfram_api_call(query, key) {
var response = UrlFetchApp.fetch("http://api.wolframalpha.com/v2/query?input=" + encodeURIComponent(query) + "&appid=" + key + "&format=plaintext");
var xml = XmlService.parse(response);
var root = xml.getRootElement();