Skip to content

Instantly share code, notes, and snippets.

@ukn
ukn / 99-install-facetime-camera.sh
Last active May 3, 2024 03:28 — forked from Stono/99-install-facetime-camera.sh
Install the kernal module required for the facetimehd camera to work on Linux
#!/bin/bash
set -e
export CONFIG_MODULE_SIG=n
export CONFIG_MODULE_SIG_ALL=n
# For current kernel
export KERNELRELEASE=$(cat /proc/version | awk '{print $3}')
temp_dir=$(mktemp -d)
echo "Installing FacetimeHD camera for $KERNELRELEASE"
@shobhitic
shobhitic / MyToken.sol
Last active May 3, 2024 03:27
ERC20 Permit OpenZeppelin Tutorial - https://www.youtube.com/watch?v=lFKcga4Y6Ys
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts@4.7.3/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts@4.7.3/token/ERC20/extensions/draft-ERC20Permit.sol";
contract MyToken is ERC20, ERC20Permit {
constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {}
function mint(address to, uint256 value) external {
@TrevTV
TrevTV / ArcOn10.md
Last active May 3, 2024 03:27
Guide to installing Arc Browser on Windows 10

As this is not an official way of installing Arc, if you encounter any issues do NOT report them to the developers, they did not intend for people to be running Arc on Windows 10.

This guide is a bit more manual since I wanted to respect the developers' wishes and not directly link any downloads to the beta of Arc.

I don't know how this will work with updates, you may just need to redo the process to update it, but I'm not sure

  1. Install this font: https://aka.ms/SegoeFluentIcons (this fixes the icons since Windows 10 doesn't have this font installed by default)
  2. Download the Arc appinstaller and open it in notepad/some other text editor
  3. Copy everything inside and paste it into this website: https://codebeautify.org/xmlviewer (this is optional, but it makes reading and copying from the file easier)
  4. Find the mainpackage @Uri, it should end in Arc.x64.msix, and open that in a new tab. It should download that msix file.
@Marx-A00
Marx-A00 / shortcuts.md
Created January 17, 2024 03:06
File containing the most important Vscode, MacOS, and Chrome shortcuts that make it easy to navigate your computer using only your keyboard. Note that file does not contain some Windows commands, and is not a comprehensive list of most useful VScode shortcuts, only shortcuts that are helpful for manipulating/navigating IDE only using the keyboard.

Navigation

To search a file:

CMD + P
Windows: CTRL+ P

While Searching:

@troyfontaine
troyfontaine / 1-setup.md
Last active May 3, 2024 03:25
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@HackingLZ
HackingLZ / nicecurl.py
Created May 2, 2024 13:43
NICECURL Lnk Gen
# https://cloud.google.com/blog/topics/threat-intelligence/untangling-iran-apt42-operations/
import argparse
import random
import win32com.client
def insert_digit(word, digit):
pos = random.randint(1, len(word) - 1)
return word[:pos] + digit + word[pos:]
def generate_command(url, file_path):
@mapmakerdavid
mapmakerdavid / usable-gis-data-philippines.csv
Last active May 3, 2024 03:20
Usable GIS data about the Philippines
THEME FORMAT SOURCE LINK
roads, waterways, building footprints, points of interest shp, pbf OpenStreetMap (OSM) http://download.geofabrik.de/asia/philippines.html
administrative boundaries (country, region, province, municipality, city) shp PSA, NAMRIA, DROMIC, UNOCHA, and patners https://data.humdata.org/dataset/philippines-administrative-levels-0-to-3
administrative boundaries (barangay) shp PSA, NAMRIA, DROMIC, UNOCHA, and patners https://data.humdata.org/dataset/philippines-admin4-boundaries-barangay
framework data (boundaries, roads, elevation, population, etc.) various DIVA-GIS http://www.diva-gis.org/gdata
topographic maps (1:50,000 and 1:250,000) non-georeferenced raster NAMRIA http://www.namria.gov.ph/download.php
various geohazards shp NOAH http://noah.up.edu.ph/downloads/
various geohazards shp DREAM https://lipad.dream.upd.edu.ph/
various geohazards shp MGB http://www.namria.gov.ph/download.php
various geohazards shp PHIVOLCS http://www.phivolcs.dost.gov.ph/
@m2wasabi
m2wasabi / README.md
Last active May 3, 2024 03:16
AWS SNS to Discord Webhook

AWS SNS to Discord Webhook

Post SNS Message to Discord Webhook

Lambda Preferences

Key Value
Platform Node.js 14
handler index.handler
@Erutan409
Erutan409 / gitlab.rb
Last active May 3, 2024 03:16
Gitlab Nginx Reverse Proxy Configuration (with Let's Encrypt SSL)
# These are fragments of the configuration that will need to be updated
# ---
## GitLab URL
##! URL on which GitLab will be reachable.
##! For more details on configuring external_url see:
##! https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab
external_url 'https://gitlab.your-fqdn.com'
#external_url 'http://gitlab.internal.lan'

Naming Controllers

Controllers should be in singular case, no spacing between words, and end with "Controller".

Also, each word should be capitalised (i.e. BlogController, not blogcontroller).

For example: BlogController, AuthController, UserController.

Bad examples: UsersController (because it is in plural), Users (because it is missing the Controller suffix).