Skip to content

Instantly share code, notes, and snippets.

View LemonyPie's full-sized avatar
🍋

Artemii LemonyPie

🍋
View GitHub Profile
@irustm
irustm / deno-faq.md
Last active June 10, 2020 13:35
Deno FAQ

Попытаюсь ответить на общие и частные вопросы, и возможно развенчать некоторые мифы, потому как очень много авторов статей прыгнули на этот хайп трейн, и под копирку вышло очень много статей. А некоторые ответы, например Раяна , были вырваны из контекста.

В дино тс из коробки, а в ноде надо настраивать. Настраивается быстро и просто. Не считаю, полезной фичей

Не знаю из какой статьи эта фраза, но думаю тож вырвано из контекста. И все таки хочется дать какой то комментарии. Возможно тут упор идет на новичков, которым не приходилось ранее работать со всякими сборщиками и лоадерами. Не говоря уж о простом запуске tsc. Да, кому то действительно это не нужно, у многих давно есть свои инструменты CLI, которые это делают, и многие даже не задумываются что происходит под капотом. Кроме того дополню что команды Deno CLI включают многие вещи, которых действительно не было в экосистеме Node из коробки. Что я имею ввиду - когда я разрабатывал на .NET все было включено, так же из коробки, и не нужны были мне те же, н

@gaquino
gaquino / gist:87bdf0e6e852e445c0489379d3e9732a
Last active April 21, 2025 20:35
MacOS (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools))
If you are facing an error like that on new MacOS version.
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
It means that you need to install XCode command line, open a Terminal and run this command:
$ xcode-select --install
Note:
If you want to download and install Command Line tools manually, it can be downloaded from: https://developer.apple.com/download/more/
@mistercoffee66
mistercoffee66 / jquery-dosomething-ES6.js
Last active November 6, 2019 16:03
ES6 module importing jQuery plugin
//jquery-dosomething-ES6.js
//after modification
//assumes jQuery is avail as global or via NPM etc
import jQuery from 'jquery'
export default function() {
+function($) {
var $this = $(this);
var newText = $this.data('text');
@subfuzion
subfuzion / curl.md
Last active July 10, 2025 20:03
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@remojansen
remojansen / class_decorator.ts
Last active September 14, 2023 14:54
TypeScript Decorators Examples
function logClass(target: any) {
// save a reference to the original constructor
var original = target;
// a utility function to generate instances of a class
function construct(constructor, args) {
var c : any = function () {
return constructor.apply(this, args);
}
@paulirish
paulirish / what-forces-layout.md
Last active July 10, 2025 08:36
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@soheilhy
soheilhy / nginxproxy.md
Last active July 5, 2025 15:29
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@ichord
ichord / gist:9808444
Created March 27, 2014 14:12
demo of using pdf.js to extract pages to images
<script src="http://cdnjs.cloudflare.com/ajax/libs/processing.js/1.4.1/processing-api.min.js"></script><html>
<!--
Created using jsbin.com
Source can be edited via http://jsbin.com/pdfjs-helloworld-v2/8598/edit
-->
<body>
<canvas id="the-canvas" style="border:1px solid black"></canvas>
<input id='pdf' type='file'/>
<!-- Use latest PDF.js build from Github -->
@jhned
jhned / mza-snippet
Last active December 28, 2018 14:32
margin: 0 auto; gist for Emmet
{
"snippets": {
"css": {
"snippets": {
"mza": "margin: 0 auto;"
}
}
}
}