Skip to content

Instantly share code, notes, and snippets.

View ayunami2000's full-sized avatar
👌
No u

ayunami2000

👌
No u
View GitHub Profile
@rb-dahlb
rb-dahlb / opengl-fix-hd-graphics-windows-10.md
Last active May 8, 2024 06:29
OpenGL fix for Intel HD Graphics 3000 on Windows 10

Fix for Open GL on Intel HD Graphics 3000 - Windows 10

The drivers for Intel HD Graphics 3000 in Windows 10 does not expose all Open GL capabilities of the GPU. So software relying on Open GL features not present in Open GL 1.1 will not work. Using older versions of Windows or Linux might work since the chip have more features than the driver exposes.

The fix is to add a compatibility shim using the Windows ADK software.

1. Download and install Windows ADK

Link: https://docs.microsoft.com/en-us/windows-hardware/get-started/adk-install

@vbe0201
vbe0201 / get-python.sh
Last active August 16, 2023 19:56
A script to install Python 3.7.2 on your Debian, Ubuntu or Mint server.
#!/bin/bash
#
# A bash script for installing Python 3.7.2 on your Debian, Ubuntu or Mint server.
# (c) 2019 Valentin B.
#
# Open your terminal and enter the following command:
# wget https://gist.github.com/vbe0201/b85ec47bc198d1c8471acbf016922005/raw/get-python.sh && chmod +x get-python.sh && ./get-python.sh
apt update -y
apt upgrade
@SandeepGamot
SandeepGamot / AllmanIndent.xml
Created October 1, 2018 10:30
Allman Indent for IntelliJ IDEA and Jetbrains IDEs. Download this file and "import style from settings->code styles->import"
<code_scheme name="Allman">
<XML>
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
</XML>
<codeStyleSettings language="JAVA"> <!-- ENTER YOU LANGUAGE HERE -->
<option name="BLANK_LINES_AFTER_CLASS_HEADER" value="1" />
<option name="BRACE_STYLE" value="2" />
<option name="CATCH_ON_NEW_LINE" value="true" />
<option name="CLASS_BRACE_STYLE" value="2" />
<option name="FINALLY_ON_NEW_LINE" value="true" />
@dragonwocky
dragonwocky / discord-webhook.js
Last active April 24, 2024 16:07
js post request example for discord webhooks using the fetch web api
// node.js versions pre-v0.18.0 do not support the fetch api and require a polyfill
// const fetch = require('node-fetch');
fetch(
'https://discordapp.com/api/webhooks/738983040323289120/mzhXrZz0hqOuUaPUjB_RBTE8XJUFLe8fe9mgeJjQCaxjHX14c3SW3ZR199_CDEI-xT56',
{
method: 'post',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
@byjg
byjg / NoVNC_Paste.js
Last active November 24, 2023 05:46
How to Paste code to NoVNC.
// This will open up a prompt for text to send to a console session on digital ocean
// Useful for long passwords
(function () {
window.sendString = function (str) {
f(str.split(""));
function f(t) {
var character = t.shift();
var i=[];
var code = character.charCodeAt();
var needs_shift = character.match(/[A-Z!@#$%^&*()_+{}:\"<>?~|]/);
@ArrEssJay
ArrEssJay / xorg.conf
Last active November 23, 2023 13:57
xorg.conf for 4 NVIDIA GTX1080i GPU, fake monitor, headless arrangement
# Use this in a situation where you want a headless Linux box with multiple GPU boards but no desktop environment
# Fake EDID convinces drivers that a monitor is connected
# Use any EDID binary file
# To start a fake X server make a systemd file with something like:
# ExecStart=/usr/bin/tcsh -c 'xinit /opt/set-gpu-fans/setfanspeed.sh -- :0 -once -config /opt/set-gpu-fans/xorg.rob'
# See other gist for fan setting script : https://gist.github.com/RobDeBagel/a960c2b157256c162220e60300529cf0
Section "ServerLayout"
Identifier "Layout0"
@IceCreamYou
IceCreamYou / regex-wordwrap.js
Created September 9, 2017 09:33
Implements simple character-count-based word wrapping with regular expressions in JavaScript
/**
* Wraps the specified string onto multiple lines by character count.
*
* Words (consecutive non-space characters) are not split up.
* Lines may be shorter than `len` characters as a result.
* Careful: words longer than `len` will be dropped!
*
* @param str The string to wrap.
* @param len The max character count per line.
*
@hallzy
hallzy / set-proxy-for-whole-machine.cmd
Last active February 9, 2022 16:51
Please read the Notes at the top of each of the scripts before you run them. Set Windows IE proxy with a cmd file, or set Windows IE proxy globally by changing the "DefaultConnectionSettings" registry key as well as "ProxySettingsPerUser" and "Proxy" for GPO settings. PLEASE SAVE A COPY OF YOUR REGISTRY JUST IN CASE YOU NEED TO GO BACK!
:: NOTE: If you don't want to make proxy settings for the whole machine,
:: find the line in this script that starts with "reg add" and change
:: "HKLM" to "HKCU" so that it only affects the current user (or change it
:: to reflect the specific hive that you want to change)
:: Supported Characters in proxy server address (if you need more, consult
:: an ascii table and make a new "if" statement for the character you need,
:: but these should suffice):
:: * - . / : ; = ? @ ~ < >
:: All Numbers
@naotokui
naotokui / melody_extraction.ipynb
Created May 8, 2017 14:12
extract melody from audio
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mindplace
mindplace / git_and_github_instructions.md
Last active May 15, 2024 18:05
Pushing your first project to github

1. Make sure git is tracking your project locally

Do you need a refresher on git? Go through Codecademy's git course.

  1. Using your terminal/command line, get inside the folder where your project files are kept: cd /path/to/my/codebase. → You cannot do this simply by opening the folder normally, you must do this with the command line/terminal.
    → Do you need a refresher on using your command line/terminal? I've compiled my favorite resources here.

  2. Check if git is already initialized: git status