Skip to content

Instantly share code, notes, and snippets.

@githubfoam
githubfoam / VirtualBox Cheat Sheet
Last active April 24, 2024 10:11
VirtualBox Cheat Sheet
==========================================================================================================
# 8. VBoxManage
https://www.virtualbox.org/manual/
==========================================================================================================
# Networking Modes
https://www.virtualbox.org/manual/ch06.html#network_bridged
==========================================================================================================
Windows Host
>vboxmanage --version
@in5ikt
in5ikt / versioning-your-saves.md
Created February 8, 2011 22:44
Minecraft - Versioning your saves

Minecraft - Versioning your saves

This is a tutorial show how to version your saves using Git.

Q: Why would anyone go through this process?
A: Because if you do, you can undo an otherwise un-undoable action, such as swimming in a pit of lava and accidentally dropping your Notch armpit forged special edition diamond pickaxe and your 35 stacks of cobblestone.

Step by step tutorial

Download and install the appropriate version of Git

@MikeNGarrett
MikeNGarrett / wp-config.php
Last active April 24, 2024 10:11
All those damned wp-config constants you can never remember.
<?php
// PHP memory limit for this site
define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' ); // Increase admin-side memory limit.
// Database
define( 'WP_ALLOW_REPAIR', true ); // Allow WordPress to automatically repair your database.
define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); // Don't make database upgrades on global tables (like users)
// Explicitely setting url
@AruniRC
AruniRC / ms_coco_classnames.txt
Created March 5, 2018 20:37
Class Names of MS-COCO classes in order of Detectron dict
{0: u'__background__',
1: u'person',
2: u'bicycle',
3: u'car',
4: u'motorcycle',
5: u'airplane',
6: u'bus',
7: u'train',
8: u'truck',
9: u'boat',
@ohownew
ohownew / 知识星球视频增强.js
Last active April 24, 2024 10:10
知识星球原生视频组件,无法通过键盘操作前进、后退、暂停、播放,于是写了一个简单的脚本,要先安装好篡改猴Tampermonkey等插件管理器。然后新建脚本,并复制如下代码
// ==UserScript==
// @name 知识星球视频增强
// @namespace http://tampermonkey.net/
// @version 2024-04-21
// @description 知识星球视频,通过键盘控制: 前进 后退 暂停 开始 全屏
// @author ohownew
// @match https://wx.zsxq.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=zsxq.com
// @grant none
// ==/UserScript==
@avinash-oza
avinash-oza / boot-from-ram-debian.md
Last active April 24, 2024 10:09
How to boot from RAM on debian
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active April 24, 2024 10:07
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

@afawcett
afawcett / Mock.cls
Last active April 24, 2024 10:06
Mocking SOQL result set containing sub-selects
/**
* Copyright (c), Andrew Fawcett
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
@andelf
andelf / trc20.py
Created February 28, 2020 18:14
Get TRC20 balance and Transfer TRC20 tokens
import requests
import base58
import base64
from pprint import pprint
ADDRESS = "T....your address"
PRIV_KEY = 'hex private key'
CONTRACT = "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t" # USDT
@jonjack
jonjack / add-update-refresh-github-access-token-on-mac.md
Last active April 24, 2024 10:05
Adding & Updating GitHub Access Token on Mac

Using an Access Token for the first time

Follow the instructions on Github to Create an Access Token in Github

Configure Git to use the osxkeychain

By default, git credentials are not cached so you need to tell Git if you want to avoid having to provide them each time Github requires you to authenticate. On Mac, Git comes with an “osxkeychain” mode, which caches credentials in the secure keychain that’s attached to your system account.

You can tell Git you want to store credentials in the osxkeychain by running the following:-