- Author: Donny Kurnia
- Release Date: Jun 5, 2018
- Original Post
Take note this is my personal edited version and the command related to Arch has been changed to work on my Arch system.
/** | |
* Simple Node.js script to turn a specific page on a Google Sheet | |
* into a JSON object for the main purpose of HTML Templating. | |
* | |
* @author jonobr1 / http://jonobr1.com | |
* | |
*/ | |
var https = require('https'); | |
var path = require('path'); |
Take note this is my personal edited version and the command related to Arch has been changed to work on my Arch system.
import { useEffect, useState } from "react"; | |
const defaultEvents = [ | |
"mousemove", | |
"mousedown", | |
"touchstart", | |
"keydown", | |
"wheel", | |
"resize", | |
]; |
# The MIT License (MIT) | |
# Copyright (c) 2016 Vladimir Ignatev | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining | |
# a copy of this software and associated documentation files (the "Software"), | |
# to deal in the Software without restriction, including without limitation | |
# the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
# and/or sell copies of the Software, and to permit persons to whom the Software | |
# is furnished to do so, subject to the following conditions: | |
# |
// 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works | |
const axios = require('axios'); // promised based requests - like fetch() | |
function getCoffee() { | |
return new Promise(resolve => { | |
setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee | |
}); | |
} |
// Does not work on iOS 14.0 or later, keeping the gist just for reference. | |
extension UITabBar { | |
override open func sizeThatFits(size: CGSize) -> CGSize { | |
super.sizeThatFits(size) | |
var sizeThatFits = super.sizeThatFits(size) | |
sizeThatFits.height = 71 | |
return sizeThatFits | |
} | |
} |
##what are generators##
yield
a value, the function pauses until .next(modifiedYieldValue)
is calledvar myGen = function*() {
var one = yield 1;
var two = yield 2;
var three = yield 3;
console.log(one, two, three);
// compile with: clang++ main.cpp -o image_exmple -lSDL2 -lSDL2_image | |
#include <SDL2/SDL.h> | |
#include <SDL2/SDL_image.h> | |
#include <cstdio> | |
#include <string> | |
#define SCREEN_WIDTH 640 | |
#define SCREEN_HEIGHT 480 | |
SDL_Window *window = NULL; |
import UIKit | |
/// Wrapper for the NSNotification userInfo values associated with a keyboard notification. | |
/// | |
/// It provides properties that retrieve userInfo dictionary values with these keys: | |
/// | |
/// - UIKeyboardFrameBeginUserInfoKey | |
/// - UIKeyboardFrameEndUserInfoKey | |
/// - UIKeyboardAnimationDurationUserInfoKey | |
/// - UIKeyboardAnimationCurveUserInfoKey |