Skip to content

Instantly share code, notes, and snippets.

@LeCoupa
LeCoupa / nodejs-cheatsheet.js
Last active May 20, 2024 06:30
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@mokoshalb
mokoshalb / Office_kms
Created July 4, 2019 05:36 — forked from CHEF-KOCH/KMS_office.cmd
KMS server Windows
cd\Program Files\Microsoft Office\Office16
cd\Program Files (x86)\Microsoft Office\Office16
cscript OSPP.VBS /sethst:kms.digiboy.ir
cscript OSPP.VBS /actcscript OSPP.VBS /dstatus
slmgr.vbs /ckms
@cjanietz
cjanietz / userscript.js
Last active May 20, 2024 06:26
Perplexity Model Selection User Script
// ==UserScript==
// @name Perplexity Model Selection
// @version 0.1
// @description Adds a custom button to Perplexity AI using jQuery
// @author dpgc
// @match https://www.perplexity.ai/*
// @updateURL https://gist.github.com/cjanietz/703a88924e50e1a30cb6ffc52bc52bd9/raw/userscript.js
// @downloadURL https://gist.github.com/cjanietz/703a88924e50e1a30cb6ffc52bc52bd9/raw/userscript.js
// @grant none
// @run-at document-end
@danidiaz
danidiaz / netrw.txt
Created October 7, 2016 20:57
Vim's netrw commands.
--- ----------------- ----
Map Quick Explanation Link
--- ----------------- ----
< <F1> Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file |netrw-cr|
<del> Netrw will attempt to remove the file/directory |netrw-del|
<c-h> Edit file hiding list |netrw-ctrl-h|
<c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
<c-r> Browse using a gvim server |netrw-ctrl-r|
<c-tab> Shrink/expand a netrw/explore window |netrw-c-tab|

Exploiting Lua 5.1 on 32-bit Windows

The following Lua program generates a Lua bytecode program called ignore-unsigned-sga.fnt, which in turn loads a DLL from within an extremely locked down Lua 5.1 sandbox in a program called RelicCOH2.exe. The remainder of this document attempts to explain how this program works by a whirlwind tour of relevent bits of the Lua 5.1 virtual machine.

if string.dump(function()end):sub(1, 12) ~= "\27Lua\81\0\1\4\4\4\8\0" then
  error("This generator requires a 32-bit version of Lua 5.1")
end

local function outer()
  local magic -- In bytecode, the stack slot corresponding to this local is changed
@trumad
trumad / arcHistoryToFirefox.md
Last active May 20, 2024 06:22
Import Arc history in Firefox

No good reason why this had to be so tricky:

  • Install Export Chrome History extension in Arc
  • Export history to JSON. Choosing the forever option does actually export ALL the history in Arc
  • Install History Export for firefox
  • Optional: Export Firefox history, to see what the json looks like
  • Make the Arc history match what firefox expects. I used this javascript to convert it:
arcHistory.map(item =&gt; {
@tunguskha
tunguskha / CSS-color-var.md
Last active May 20, 2024 06:21
Darken & Lighten colors in pure CSS using variables.
:root {
  /* Base color using HSL */
  --hue: 207;
  --saturation: 64%;
  --light: 44%;
  
  /* Base color in variable */
  --primary-color: hsl(var(--hue), var(--saturation), var(--light));
 /* Base color lighten using calc */
@AveYo
AveYo / !BlackLess.md
Last active May 20, 2024 06:19
A High Contrast based neutral / less blues tone Windows Dark / Light Theme by AveYo

Blackless.theme

@sxzz
sxzz / Vue 3.3 主要新特性详解.md
Last active May 20, 2024 06:15
Vue 3.3 主要新特性详解

Vue 3.3 主要新特性详解

前言

Hi,这里是三咲智子,Vue 核心团队成员。Vue 3.3 的这次发布主要是为了改进 DX (开发者体验),新增了一些语法糖和宏,以及 TypeScript 上的改善。

  • 泛型组件
  • 在 SFC(单文件组件)中导入外部 TS 类型
  • defineSlots 来定义插槽的类型
  • defineEmits 更便捷的语法
@johan
johan / octocat.svg
Created June 4, 2011 11:16
Github octocat avatar, SVG format
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.