Skip to content

Instantly share code, notes, and snippets.

@anubhavshrimal
anubhavshrimal / CountryCodes.json
Last active April 30, 2024 15:05 — forked from Goles/CountryCodes.json
Country and Dial or Phone codes in JSON format
[
{
"name": "Afghanistan",
"dial_code": "+93",
"code": "AF"
},
{
"name": "Aland Islands",
"dial_code": "+358",
"code": "AX"
#!/bin/bash
#####
# OSX Machine auth for 802.1x profile
# get AD machine user/pass and put into 802.1x profile template
# install the profile
#
# sed has it's own uses for '&' and '\' in replacements
# and the randomly generated password sometimes has them
# So, trap and escape them before feeding into sed
#
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active April 30, 2024 15:05
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@tos-kamiya
tos-kamiya / pandocでgfmなmarkdownをa4サイズのpdfにする(2021).md
Last active April 30, 2024 15:04
Pandocを使ってgfmなMarkdownをA4サイズのPDFにする(2021)
@BaiduDownloader
BaiduDownloader / How to download from Pan.Baidu.com without account.md
Last active April 30, 2024 15:04
How to download from Pan.Baidu.com without account

How to download from Pan.Baidu.com without an account|New method 2022-2023

Untitled-1-Recovered323.png

BaiduDownloader.com. This web tool allows you to download any file or folder from Pan Baidu to any device. All you need to do is enter your Baidu link and your email address and wait a few minutes for it to download for you. Use the code “FREEDOWNLOAD1GB”. You can download any file or folder up to 1GB for free.

Baidu Cloud comes from Baidu China and is currently not open to the public. You should transfer the project folder or download the file to another cloud to use it.

Steps

1. Open the website mentioned above and select item , or uses this direct link:

https://baidudownloader.com/product/transfer-pan-baidu-com-link-to-googgle-drive-link/

@jarednova
jarednova / gist:6095599
Created July 27, 2013 17:32
Twig / Timber if/else
{% if post.thumbnail %}
<img src="{{post.thumbnail.src}}" />
{% elseif post.heroimage %}
<img src="{{post.heroimage.src}}|resize(300, 300)" />
{% else %}
<img src="/wp-content/themes/mytheme/default-image.jpg" />
{% endif %}
@devorbitus
devorbitus / README.md
Last active April 30, 2024 15:02
AWS Fargate Volume Mount a file

THIS MIGHT NOT BE FULLY ACCURATE

To volume mount a single file into an AWS Fargate container, you can use the secrets or environment files feature of AWS Fargate. Here's how you can accomplish this:

  1. Create a new file with the desired content that you want to mount into the container. Let's call this file config.txt.

  2. Upload the config.txt file to AWS Systems Manager Parameter Store or AWS Secrets Manager. These services allow you to securely store and manage configuration data or secrets.

    • For Systems Manager Parameter Store, create a new parameter and store the content of config.txt as the value.
    • For Secrets Manager, create a new secret and store the content of config.txt as the secret value.
@bluewalk
bluewalk / GetNordVPNWireGuardDetails.md
Last active April 30, 2024 15:01
Getting NordVPN WireGuard details

About

Instructions to obtain WireGuard details of your NordVPN account. These can be used to setup a WireGuard tunnel on your router to NordVPN.

Source: https://forum.gl-inet.com/t/configure-wireguard-client-to-connect-to-nordvpn-servers/10422/27

Prerequisites

If you have any linux machine, use that or install a vm if you don't have one.

Get their official linux app installed. Make sure you have wireguard installed too. And set the used technology to Nordlynx by running nordvpn set technology nordlynx

@Killeroid
Killeroid / gpg-import-and-export-instructions.md
Created October 18, 2017 11:51
How to export and import gpg keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Gotten from the RedHat GPG migration manual

Backup the public and secret keyrings and trust database

## Export all public keys

gpg -a --export >mypubkeys.asc

@islander
islander / fsck_qcow2.md
Last active April 30, 2024 15:00
Recover a qcow2 image using fsck

Recover a qcow2 image using fsck

Load network block device module:

# modprobe nbd max_part=8

Poweroff machine:

# virsh destroy virtual-machine