Skip to content

Instantly share code, notes, and snippets.

If 2fa is enabled on github switch to ssh instead of https on linux
1. generate an ssh keypair on your linux box
ssh-keygen -t {rsa|dsa}
2. add the public key to github: profile - settings - ssh keys
3. switch from https to ssh
Check your repo remote:
@lambdaxyzt
lambdaxyzt / image.jsx
Last active April 18, 2024 04:30
Remix Image Component ( use cache 'cacashe library' , stream base , sharp library )
// resource route component
import React from "react";
import { PassThrough } from "node:stream"
import fs from "node:fs"
import {createReadableStreamFromReadable} from "@remix-run/node"
import { defaultQuality,widths,mainImageReadStream,generatedImageReadstream, isThereImage,BadImageResponse } from "../../util/image.server"
export const loader = async ({ request }) => {
const url = new URL(request.url);
const src = url.searchParams.get("src");
@Dlfaith
Dlfaith / gist:0d43be3dfb296bb6260af75ef082faa8
Created December 6, 2022 02:51
Free Windows Server 2022 Product Key
Free Windows Server 2022 Standard Product Key
HP9DJ-NK2X6-4QPCH-8HY8H-6X2XY
RRNMT-FP29D-CHKCH-GWQP2-DDDVB
44QN4-X3R72-9X3VK-3DWD6-HFWDM
Free Windows Server 2022 Datacenter Product Key
WX4NM-KYWYW-QJJR4-XV3QB-6VM33
Download windows Sever 2022 Evaluation edition:
Windows Server 2022 Evaluation English
@Eyal-Shalev
Eyal-Shalev / ComboForm.php
Created June 7, 2016 19:41
An example form object (Drupal 8) that combines multiple forms into itself.
<?php
namespace Drupal\sandbox\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormInterface;
use Drupal\Core\Form\FormState;
use Drupal\Core\Form\FormStateInterface;
use Drupal\node\Entity\Node;
use Drupal\user\Entity\User;
@blaylockbk
blaylockbk / multipro_template.py
Last active April 18, 2024 04:28
Template for Python multiprocessing and multithreading
import multiprocessing #:)
def do_this(number):
print number
return number*2
# Create a list to iterate over.
# (Note: Multiprocessing only accepts one item at a time)
some_list = range(0,10)
@todgru
todgru / elasticsearch-setup-apple-macbook-pro-m1.md
Created February 9, 2023 23:52
Install Elasticsearch 7.x on Apple Macbook Pro M1 Ventura 13.2

Elasticsearch Setup Apple MacBook Pro M1

Apple MacBook Pro M1, 32 GB, Ventura 13.2

Documentation based on comments in this Github Elasticsearch issue.

Install Homebrew

@yasirkula
yasirkula / SlicedFilledImage.cs
Last active April 18, 2024 04:23
Combining UI Image's Sliced+Filled features together in Unity
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
#if UNITY_2017_4 || UNITY_2018_2_OR_NEWER
using UnityEngine.U2D;
#endif
using Sprites = UnityEngine.Sprites;
#if UNITY_EDITOR
@twinstae
twinstae / coding-is-fun-question-mark.md
Last active April 18, 2024 04:23
코딩은 재미 있나요?

안녕하세요. 탐토입니다. 오늘은 코딩이 어떻게 하면 재미있어질 수 있는지에 대해 이야기해보려 해요.

요약

  • 자전거 배달부로 아기를 돌보는 분들에게 기저귀와 분유 배달하는 것도 보람찬 일이었다.
  • 코딩으로 가치있는 문제를 해결하는 것도 힘들지만 즐거웠으며, 보람찬 일을 하는 건 노동자의 권리다.
  • 천재 슈퍼 개발자가 아니면 무시 받아 마땅하고 해고와 연봉 삭감의 사유라는 것은 자본가들의 가스라이팅일 뿐이다.
  • 누구나 자기의 속도로 하나 둘 해나가면 성장하고 성취하고 즐거움을 찾을 수 있다.
  • 쓸모 없지만 재미있는 일을 하다보면 쓸모도 생기는 것이지. 쓸모에 집착하면 우울해집니다.

저는 부럽다는 말을 많이 듣습니다. 물론 잘 알지도 못하면서 아는 척 한다고 욕도 먹습니다만. 부럽다는 레파토리 중에 하나는 "토끼 님은 코딩이 재미있어 보인다"는 것입니다.

@endolith
endolith / output.png
Last active April 18, 2024 04:22
Detecting rotation and line spacing of image of page of text using Radon transform
output.png
@shiritrong
shiritrong / gist:d85bb1e16c66d1a09896727780b4fc7c
Last active April 18, 2024 04:21
Windows 7 All Online/Offline [Retail-MAK] Activation Keys
Windows 7 All Online/Offline [Retail-MAK] Activation Keys
=================================================================================
. Run "Command Prompt" as Administrator
. slmgr.vbs -ipk Product Key
. slui4
=================================================================================
Windows 7 Ultimate Retail Phone Activation Keys
RHTBY-VWY6D-QJRJ9-JGQ3X-Q2289
V77DJ-CT8WB-Y3GXT-X3FBP-6F987
JC7BV-94FD2-D86PH-XRMHR-BXKDG