Skip to content

Instantly share code, notes, and snippets.

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

Pawan Kumar Singh pawansingh00

🏠
Working from home
View GitHub Profile
session.connect(token, function (error, data) {
if (error) {
console.error("Error connecting: ", error.code, error.message);
if (["OT_NOT_CONNECTED", "OT_CONNECT_FAILED", "OT_SOCKET_CLOSE_TIMEOUT"].includes(error.name)) {
// CODE TO UPDATE UI that connection Lost, trying to Reconnect.
showReconnectingUI();
if (!!window.chrome) {
async startScreenCapture() {
let captureMediaStream = null;
let screen_constraints = {
video: {
cursor: "always",
displaySurface: "monitor"
}
};
try {
async startScreenCapture() {
let captureMediaStream = null;
let screen_constraints = {
video: {
cursor: "always",
displaySurface: "monitor"
}
};
try {
const videoTrack = mediaStream.getVideoTracks()[0];
@pawansingh00
pawansingh00 / how-to-install-latest-gcc-on-ubuntu-lts.txt
Created March 8, 2022 05:04 — forked from application2000/how-to-install-latest-gcc-on-ubuntu-lts.txt
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
System.TypeLoadException: Failure has occurred while loading a type.
at OmniSharp.Http.Driver.Program+<>cDisplayClass0_1.<Main>b1 () [0x00000] in <bf6761d1be88458fb36a3a4024077905>:0
at OmniSharp.CommandLineApplication+<>cDisplayClass11_0.<OnExecute>b0 () [0x0000b] in <14903a02b2c54ee0863bee9bf9ff4218>:0
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute (System.String[] args) [0x00039] in <344a1e8cd6594b17b1e01f8df6ae8827>:0
at OmniSharp.CommandLineApplication.Execute (System.String[] args) [0x00081] in <14903a02b2c54ee0863bee9bf9ff4218>:0
at OmniSharp.Http.Driver.Program+<>cDisplayClass0_0.<Main>b0 () [0x00028] in <bf6761d1be88458fb36a3a4024077905>:0
at OmniSharp.HostHelpers.Start (System.Func`1[TResult] action) [0x0001c] in <14903a02b2c54ee0863bee9bf9ff4218>:0
Could not load signature of OmniSharp.CommandLineApplication:get_LogLevel due to: Could not load file or assembly or one of its dependencies. assembly:netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 type:<unknown type> member:<none>
@pawansingh00
pawansingh00 / c#_debug_logs.txr
Created November 25, 2021 06:11
C#_autosuggestion_error
"POST /completions HTTP/1.1" 200 3186
Nov 25 06:08:13 python3.8[9182]: 2021-11-25 06:08:13,516 - DEBUG - Event name: FileReadyToParse
Nov 25 06:08:13 python3.8[9182]: 2021-11-25 06:08:13,516 - INFO - Adding buffer identifiers for file: /home/ubuntu/ycmd/some_csharp.cs
Nov 25 06:08:13 python3.8[9182]: 2021-11-25 06:08:13,517 - INFO - Starting OmniSharp server
Nov 25 06:08:13 python3.8[9182]: 2021-11-25 06:08:13,517 - INFO - Loading solution file /home/ubuntu/ycmd/some_csharp.sln
Nov 25 06:08:13 python3.8[9182]: 2021-11-25 06:08:13,517 - INFO - using port 60217
Nov 25 06:08:13 python3.8[9182]: 2021-11-25 06:08:13,517 - INFO - Starting OmniSharp server with: ['/usr/bin/mono', '/home/ubuntu/ycmd-setup/ycmd/ycmd/completers/cs/../../../third_party/omnisharp-roslyn/omnisharp/OmniSharp.exe', '-p', '60217', '-s', '/home/ubuntu/ycmd/some_csharp.sln']
Nov 25 06:08:13 python3.8[9182]: 2021-11-25 06:08:13,524 - INFO - Started OmniSharp server
Nov 25 06:08:13 python3.8[9182]: 127.0.0.1 - - [25/Nov/2021 06:08:13] "POST /ev
@pawansingh00
pawansingh00 / build.py_logs.txt
Created November 18, 2021 10:30
build.py logs
ubuntu@ip-172-32-2-28:~/ycmd-setup/ycmd$ python3.8 build.py --all --verbose
Searching Python 3.8 libraries...
Found Python library: /usr/lib/python3.8/config-3.8-x86_64-linux-gnu/libpython3.8.so
Found Python headers folder: /usr/include/python3.8
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
@pawansingh00
pawansingh00 / cmake_install.sh
Last active December 6, 2021 11:33
Installing latest cMake
# Building and Installing (Recommended for developers)
# For this approach you need to install the GCC tools:
sudo apt update
sudo apt install build-essential libtool autoconf unzip wget
# 1 - Uninstall the default version provided by Ubuntu's package manager.
sudo apt remove --purge --auto-remove cmake
# or sudo apt purge --auto-remove cmake