Skip to content

Instantly share code, notes, and snippets.

@taskylizard
taskylizard / fmhy.md
Last active April 25, 2024 13:38
/r/freemediaheckyeah, in one single file (view raw)
@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active April 25, 2024 13:38
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@QingyangKong
QingyangKong / Runners.sol
Last active April 25, 2024 13:37
sample codes for Chainlink VRF
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
// Deploy this contract on Fuji
import "@openzeppelin/contracts@4.6.0/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts@4.6.0/utils/Counters.sol";
import "@openzeppelin/contracts@4.6.0/utils/Base64.sol";
import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
@garrettdashnelson
garrettdashnelson / bib-titlecase.py
Last active April 25, 2024 13:35
Convert titles in bibtex citation library to title case
# Original by Daniel L. Greenwald
# http://dlgreenwald.weebly.com/blog/capitalizing-titles-in-bibtex
# Modified by Garrett Dash Nelson
import re
from titlecase import titlecase
# Input and output files
my_file = 'library.bibtex'
new_file = 'library-capitalized.bibtex' # in case you don't want to overwrite
@jefferyb
jefferyb / insecure-registries-with-podman.md
Created January 19, 2022 04:03
Configure podman to work with insecure registries... Using MicroK8s’ built-in registry

How to configure podman to work with insecure registries

Working with MicroK8s’ built-in registry

$ microk8s enable registry

# or if you want to specify the amount of storage to be added. E.g., to use 40Gi:
$ microk8s enable registry:size=40Gi
@HerringtonDarkholme
HerringtonDarkholme / nihongo.cpp
Last active April 25, 2024 13:34
g++ nihongo.cpp
#define エスティーディー std
#define アイオーストリーム <iostream>
#define ユージング using
#define イフ if
#define インクルード #include
#define イント int
#define シーアウト cout
#define シーイン cin
#define ネームスペース namespace
#define ブール bool
@lucasalvessouza
lucasalvessouza / install_postaman.sh
Created February 19, 2019 19:47
Install postman fedora
#!/bin/bash
wget https://dl.pstmn.io/download/latest/linux64 -O postman-linux-x64.tar.gz
sudo tar xvzf postman-linux-x64.tar.gz -C /opt
sudo ln -s /opt/Postman/Postman /usr/bin/postman
cat << EOF > ~/.local/share/applications/postman2.desktop
[Desktop Entry]
Name=Postman
GenericName=API Client
@jyshnkr
jyshnkr / Rename Xcode Project.md
Last active April 25, 2024 13:30
How to Rename the Xcode Project (Including all the files & folders)

Rename the Xcode Project (Including Files and Folders)

Step 1 - Rename the project:

  1. Click on the project you want to rename in the "Project navigator" in the left panel of the Xcode window.

  2. In the right panel, select the "File inspector", and the name of your project should be found under "Identity and Type". Change it to your new name.

  3. When the dialog asks whether to rename or not rename the project's content items, click "Rename". Say yes to any warning about uncommitted changes.

@wissamnd
wissamnd / balancedString.java
Last active April 25, 2024 13:30
A string containing only parentheses is balanced if the following is true: 1. if it is an empty string 2. if A and B are correct, AB is correct, 3. if A is correct, (A) and {A} and [A] are also correct. Examples of some correctly balanced strings are: "{}()", "[{()}]", "({()})" Examples of some unbalanced strings are: "{}(", "({)}", "[[", "}{" e…
import java.util.*;
class Solution{
public static void main(String []argh)
{
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
String input= sc.next();
System.out.println(checkIfBalanced(input,'{', '}')&&checkIfBalanced(input,'[', ']')&&checkIfBalanced(input,'(', ')'));
}
@thesamesam
thesamesam / xz-backdoor.md
Last active April 25, 2024 13:26
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that