Skip to content

Instantly share code, notes, and snippets.

View garily's full-sized avatar
:octocat:
🤯

Gary garily

:octocat:
🤯
  • Imblicrb Hitsaou
View GitHub Profile
i
me
my
myself
we
our
ours
ourselves
you
your
@weakish
weakish / backup-providers.md
Last active August 30, 2024 09:57
reviews of vps, storage, mail forward
@StarDuster
StarDuster / gist:ee03a890e0f92fa53584a4fc9b358d03
Last active March 7, 2017 01:34
Mac OS X 背后的故事
@nepsilon
nepsilon / how-to-force-a-file-download-with-ningx.md
Last active January 10, 2022 05:29
How to force a file download with Nginx? — First published in fullweb.io issue #73

How to force a file download with Nginx?

In short:

add_header Content-Disposition 'attachment; filename="foo.txt"';

We’re just adding a Content-Disposition header in the response. You can specify the file name, here we’re using foo.txt.

@leemartin
leemartin / musickit-token-encoder.js
Last active July 28, 2022 01:54
Apple Music API Token for MusicKit
"use strict";
const fs = require("fs");
const jwt = require("jsonwebtoken");
const privateKey = fs.readFileSync("AuthKey.p8").toString();
const teamId = "ABCDE12345";
const keyId = "ABCDE12345";
const jwtToken = jwt.sign({}, privateKey, {
@ThaddeusJiang
ThaddeusJiang / isLeapYear.js
Last active October 19, 2022 04:59
isLeapYear in TypeScript
function isLeapYear(year: number) {
return new Date(year, 1, 29).getDate() === 29
}
export default isLeapYear
[
{
"key": "cmd+shift+l",
"command": "editor.action.insertSnippet",
"when": "editorTextFocus",
"args": {
"snippet": "console.dir(${TM_SELECTED_TEXT}$1, { depth: null })$0;"
}
}
]