Skip to content

Instantly share code, notes, and snippets.

View nitingupta910's full-sized avatar

Nitin Gupta nitingupta910

View GitHub Profile
@vgmoose
vgmoose / a_readme.md
Last active April 30, 2024 21:35
Yet another How to Create a Windows 11 Install USB from Ubuntu Linux or Mac

Creating a Windows 11 Install USB in 2022

I have been installing Windows for a long time. Does it get easier? I want to say it gets easier, but it seems like there's always some new wrinkle! These instructions are as much a note to my future self as they may be useful to anyone else.

For me, I was not able to get any exfat-based installs, or even any of the GUI helpers to make this process any more straightforward. Maybe on your target Windows / host OS those helpers will work, but the below process (as of current year) is consistent, and not overly complicated.

Overview:

  1. Downloading an official ISO image from MS:
  2. Formatting the drive (at least 8GB) as GPT, and one FAT-format partition (aka MS-DOS)
@FCLC
FCLC / PopOS_amdgpu.md
Last active April 26, 2024 00:12
Installing amdgpu-pro on popOS to enable OpenCL, ROCm and HIP

currently out of date as of September 2022, needs a fresh update

TLDR; edit the amdgpu-install script to add pop as supported debian distribution, comment out check for linux-modules-extra-[versions] since they're provided by linux-modules [per Jeremy Solle of System_76], then run with --no-dkms

3 EDIT: 4 things need to be done.

Problem 1) Pop!_OS not valid install target "Unsupported OS: /etc/os-release ID 'pop'" The issue as of now is that amdgpu-install doesnt recognize pop as a valid installation candidate. Solution is to add pop as a valid target in the amdgpu-install script.

msys2 vs msys vs msysgit
MinGW doesn't provide a linux-like environment, that is MSYS(2) and/or Cygwin
Cygwin is an attempt to create a complete UNIX/POSIX environment on Windows.
MinGW is a C/C++ compiler suite which allows you to create Windows executables - you only
need the normal MSVC runtimes, which are part of any normal Microsoft Windows installation.
MinGW provides headers and libraries so that GCC (a compiler suite,
not just a "unix/linux compiler") can be built and used against the Windows C runtime.
@Brainiarc7
Brainiarc7 / skylake-tuning-linux.md
Last active March 30, 2024 16:01
This gist will show you how to tune your Intel-based Skylake, Kabylake and beyond Integrated Graphics Core for performance and reliability through GuC and HuC firmware usage on Linux.

Tuning Intel Skylake and beyond for optimal performance and feature level support on Linux:

Note that on Skylake, Kabylake (and the now cancelled "Broxton") SKUs, functionality such as power saving, GPU scheduling and HDMI audio have been moved onto binary-only firmware, and as such, the GuC and the HuC blobs must be loaded at run-time to access this functionality.

Enabling GuC and HuC on Skylake and above requires a few extra parameters be passed to the kernel before boot.

Instructions provided for both Fedora and Ubuntu (including Debian):

Note that the firmware for these GPUs is often packaged by your distributor, and as such, you can confirm the firmware blob's availability by running:

@lambdahands
lambdahands / _readme.md
Created September 28, 2015 17:09
FlowType and CSS Modules

Huh?

So basically FlowType doesn't know about CSS Modules, a really handy way of dealing with the plagues of CSS in codebases (global variables and dependency wackiness mainly).

What WebPack allows us to do is "require" CSS files and use their class names:

import styles from "my_styles.css";
import React from "react";
@nitingupta910
nitingupta910 / main.c
Last active July 15, 2023 02:58 — forked from crosbymichael/main.c
rocksdb C example
/*
Makefile:
(make sure Makefile is indented using a tab and not spaces)
all:
cc -Wall -g -O0 rdb_mergeop.c -o rdb_mergeop -lstdc++ -lrocksdb -lsnappy -lbz2 -llz4 -lz
clean:
rm -rf rdb_mergeop
rm -rf testdb
*/

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@dcalacci
dcalacci / pbcopy.el
Last active March 26, 2018 18:10
copy and paste from a mac into emacs, even with TRAMP.
(defun copy-from-osx ()
"Handle copy/paste intelligently on osx."
(let ((pbpaste (purecopy "/usr/bin/pbpaste")))
(if (and (eq system-type 'darwin)
(file-exists-p pbpaste))
(let ((tramp-mode nil)
(default-directory "~"))
(shell-command-to-string pbpaste)))))
(defun paste-to-osx (text &optional push)
@jeetsukumaran
jeetsukumaran / custom_iterator.cpp
Created February 18, 2010 02:33
Sample C++/STL custom iterator
// Sample custom iterator.
// By perfectly.insane (http://www.dreamincode.net/forums/index.php?showuser=76558)
// From: http://www.dreamincode.net/forums/index.php?showtopic=58468
#include <iostream>
#include <vector>
#include <algorithm>
#include <iterator>
#include <cassert>