Skip to content

Instantly share code, notes, and snippets.

View littlecxm's full-sized avatar
🏠
Working from home

CXM littlecxm

🏠
Working from home
View GitHub Profile
@indyfromoz
indyfromoz / VNC_Server_On_Ubuntu_22.04LTS.md
Last active April 14, 2025 13:34
VNC Server setup on Ubuntu 22.04 LTS

Setup

Install TigerVNC -

$ sudo apt install tigervnc-standalone-server

Configure VNC Server by running

@ayebrian
ayebrian / vmware.md
Last active May 4, 2025 19:58
CONTENT REMOVED

Content removed in accordance with GitHub's Terms of Service.

Thank you for your understanding.

@chenzhuoyu
chenzhuoyu / Schneider SPM & SPRM Series UPS Support for Synology DSM 7.md
Last active April 5, 2025 14:35
Schneider SPM & SPRM Series UPS Support for Synology DSM 7

Schneider SPM/SPRM Series UPS Support for Synology DSM 7

Step 1: Connect your UPS and NAS with USB cable

You should see a NEW serial port (like /dev/ttyUSB0) been added to /dev. Remember that for the later steps.

If not, please refer to this GitHub repo for building and installing the driver for CH341 USB to Serial Converter chips.

Step 2: Test the connection

@kentbrew
kentbrew / lang_chrome_osx.md
Last active April 28, 2025 08:26
How to change the Chrome default language on OSX

How to Change your Chrome Default Language

Open up a Terminal window. (If you have never seen Terminal before, go to Spotlight Search and type "Terminal.")

In the Terminal box, try this:

defaults read com.google.Chrome AppleLanguages

If you see this:

@jeremykenedy
jeremykenedy / homestead_sqlsrv_driver_installer.sh
Created January 17, 2017 22:18 — forked from andysnell/homestead_sqlsrv_driver_installer.sh
SQL Server Driver Installer for Laravel Homestead
#!/bin/bash
# SQL Server Driver Installer for Laravel Homestead
#
# This script downloads, compiles, and installs the PHP 7 extension
# files for both the native sqlsrv and the PDO pdo_sqlsrv drivers.
# Get the Microsoft Driver Source Code from Github
cd ~
git clone https://github.com/Microsoft/msphpsql.git
cd msphpsql
@0xjac
0xjac / private_fork.md
Last active May 6, 2025 12:52
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

// Untar takes a destination path and a reader; a tar reader loops over the tarfile
// creating the file structure at 'dst' along the way, and writing any files
func Untar(dst string, r io.Reader) error {
gzr, err := gzip.NewReader(r)
if err != nil {
return err
}
defer gzr.Close()
@josephspurrier
josephspurrier / sha1.go
Created August 26, 2015 22:08
SHA1 Hash Generator in Golang
package main
import (
"crypto/sha1"
"fmt"
"io"
"math"
"os"
)
@lolzballs
lolzballs / HelloWorld.java
Created March 22, 2015 00:21
Hello World Enterprise Edition
import java.io.FileDescriptor;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
public class HelloWorld{
private static HelloWorld instance;
public static void main(String[] args){
instantiateHelloWorldMainClassAndRun();
@jasonslyvia
jasonslyvia / clear_cache
Last active May 16, 2019 05:30
一键清除 Discuz 后台缓存 使用方法:http://undefinedblog.com/2014/02/discuz-disgusts-me/
<?php
require './source/class/class_core.php';
require './source/function/function_misc.php';
require './source/function/function_forum.php';
require './source/function/function_admincp.php';
require './source/function/function_cache.php';
$discuz = C::app();