Skip to content

Instantly share code, notes, and snippets.

View cygmris's full-sized avatar

Chris cygmris

View GitHub Profile
@cygmris
cygmris / douyin_webcast_message
Created February 16, 2022 10:19 — forked from irever/douyin_webcast_message
#douyin #tiktok #protobuf #message #webcast
1 {
1: "WebcastChatMessage" //method
2 {
1 { //common
1: "WebcastChatMessage" //method
2: 6831800841696561932 //msg_id
3: 6831775107220769536 //room_id
4: 1590652825937 //create_time
6: 1 //is_show_msg
}
@cygmris
cygmris / .gitignore
Created September 20, 2019 08:15 — forked from smoser/.gitignore
cloud-init ubuntu nocloud example with network config
*.img
*.raw
@cygmris
cygmris / README
Created April 1, 2019 10:15 — forked from kalxas/README
Customize ubuntu live image
# first, get the iso from http://releases.ubuntu.com/
# make working dir hierarchy in /tmp (you'll need enough ram for this)
sudo mkdir -p /tmp/custom/{_squash,_work,iso,newiso,newlive,project}
sudo mount -o loop ~/Downloads/ubuntu-15.10-desktop-amd64.iso /tmp/custom/iso
sudo mount -t squashfs /tmp/custom/iso/casper/filesystem.squashfs /tmp/custom/_squash
sudo mount -t overlay overlay -onoatime,lowerdir=/tmp/custom/_squash,upperdir=/tmp/custom/project,workdir=/tmp/custom/_work /tmp/custom/newlive
# customize the live fs with systemd-nspawn (a better chroot)
sudo systemd-nspawn --bind-ro=/etc/resolv.conf:/run/resolvconf/resolv.conf --setenv=RUNLEVEL=1 -D /tmp/custom/newlive
@cygmris
cygmris / project_create.sh
Created September 2, 2018 16:11 — forked from rstarmer/project_create.sh
Basic model for building an openstack project
#!/bin/bash
#
# This script is meant to be run once after running start for the first
# time. This script downloads a cirros image and registers it. Then it
# configures networking and nova quotas to allow 40 m1.small instances
# to be created.
IMAGE_URL=https://cloud-images.ubuntu.com/trusty/current/
IMAGE=trusty-server-cloudimg-amd64-disk1.img
IMAGE_NAME=Ubuntu1404
@cygmris
cygmris / BuildNewOSLab_Example.sh
Last active September 2, 2018 16:10 — forked from lrivallain/BuildNewOSLab_Example.sh
Helper to deploy openstack-based lab for training practical exercice
# Following command will create:
# * instance(s) named "training"
# * based on ubuntu image
# * start 10* instances
# * append index starting from 1
# * 5Gb disk per instance
# * sizing based on flavor: m1.tiny
# * connected to network: training_net
# * security group applied: training_sec
# * ssh key will be: mysshkey
@cygmris
cygmris / dhajare.sh
Created September 2, 2018 16:09 — forked from psachin/dhajare.sh
dhajare.sh
rm file1.txt
for i in `openstack server list -f value -c Name`; do
SERVER_DETAIL=$(openstack server show inst2 -c created -c flavor -c project_id -f value | tr '\r\n' ' ')
created=$(echo $SERVER_DETAIL | awk '{print $1}')
flavor=$(echo $SERVER_DETAIL | awk '{print $2}')
project_id=$(echo $SERVER_DETAIL | awk '{print $4}')
FLAVOR_DETAIL=$(openstack flavor show $flavor -f value -c disk -c ram -c vcpus)
disk_size_gb=$(echo $FLAVOR_DETAIL | awk '{print $1}')
ram_mb=$(echo $FLAVOR_DETAIL | awk '{print $2}')
cpus=$(echo $FLAVOR_DETAIL | awk '{print $3}')
@cygmris
cygmris / os_functions.sh
Created September 2, 2018 16:08 — forked from ThinGuy/os_functions.sh
Basic openstack tests as functions
####OpenStack Test Functions######
#This file should be sourced, not ran
###Prettyfication section####
tstatus() {
RC=$(echo $?)
[[ $RC -eq 0 ]] && { printf '\e[75G\e[1;37m[ \e[1;32mOK\e[1;37m ]\e[0m\n';return $RC; }
[[ $RC -eq 1 ]] && { printf '\e[75G\e[1;37m[\e[1;31mFAIL\e[1;37m]\e[0m\n';return $RC; }
}
@cygmris
cygmris / volumes.sh
Created August 31, 2018 09:58 — forked from BugRoger/volumes.sh
Nova Volume Mount Error Reproduction
#!/bin/bash
COUNT=2
PREFIX=dup
function openstack {
docker run \
-e http_proxy= \
-e https_proxy= \
-e no_proxy= \
@cygmris
cygmris / arch-linux-install
Created April 29, 2018 07:51 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap

Ubuntu/Mint Install Nvidia Drivers GTX950-GTX TITAN X 2016

See https://www.youtube.com/watch?v=cVTsemATIyI

Ajoutée le 28 août 2015

This tutorial was made for the GTX 950, GTX 960, GTX 970, GTX 980, GTX 980 Ti, and GTX TITAN X.

UPDATE: I have updated the commands in here with the most recent driver Nvidia recommends for the GTX950-GTX TITAN X This guide will help you set up your Nvidia graphics card even if you boot to a blank sceen or are completely locked out of your GUI.