Skip to content

Instantly share code, notes, and snippets.

View marklearst's full-sized avatar
:accessibility:
👾 Pushing pixels with purpose. 🛠️ Tools for humans.

Mark Learst marklearst

:accessibility:
👾 Pushing pixels with purpose. 🛠️ Tools for humans.
View GitHub Profile
import Foundation
class NetworkManager: NSObject, URLSessionDelegate, URLSessionTaskDelegate {
static let shared = NetworkManager()
lazy var session: URLSession = {
let config = URLSessionConfiguration.default
return URLSession(configuration: config, delegate: self, delegateQueue: nil)
}()
@marklearst
marklearst / vscode-old-settings.json
Created December 28, 2022 23:16
Older Bloated VS Code Settings
{
"editor.fontSize": 18,
"editor.fontFamily": "MonoLisa, Menlo, Monaco, 'Courier New', monospace",
"editor.tabSize": 2,
"editor.formatOnPaste": true,
"editor.minimap.renderCharacters": false,
"editor.fontLigatures": true,
"editor.lineHeight": 30,
"editor.wordWrap": "on",
"editor.rulers": [80, 120],
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.18039216101169586</real>
@marklearst
marklearst / nav-last-item-has-slash.css
Created January 12, 2019 10:08
Adding slash to last nav item in Advanced Reacts sick-fits, @media to handle 1300px+ so no funky vertical scroll issues.
&::before,
&:last-child span::before {
content: '';
width: 2px;
background: ${props => props.theme.lightgrey};
height: 100%;
left: 0;
position: absolute;
transform: skew(-20deg);
top: 0;

Base JavaScript Learning Resources

This is a list of base JavaScript learning resources from people who responded to this [Tweet][9] and this [Tweet][10].

  • [@mpjme's YouTube videos][5]

  • [@wesbos's YouTube videos][4]

  • [Eloquent JavaScript by Marijn Haverbeke][7]

Item.update({ _id: id }, { $set: { text: 'changed' }}).exec();
<svg viewBox="0 0 100 100">
<use xlink:href="#facebook"></use>
</svg>
// An Array of Fruits
var fruits = [
'apple',
'pear',
'fig'
]
// An Array of Nuts
var nuts = [
'walnuts',
'cashews',
@marklearst
marklearst / example.js
Last active January 8, 2017 03:52
forEach example 1
// Object with div element and base attributes
var divElementObj = {
tag: 'div',
class: 'col-4'
}
// An Array of Fruits
var fruits = [
'apple',
'pear',
@marklearst
marklearst / .bash_profile
Created December 31, 2016 18:44
My .bash_profile configuration file.
export PATH=/usr/local/bin:$PATH
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
if [ -f /usr/local/etc/bash_completion ]; then
. /usr/local/etc/bash_completion
fi
parse_git_dirty() {