Skip to content

Instantly share code, notes, and snippets.

View jai-x's full-sized avatar
🤔
Thinking hard

Jai Sharma jai-x

🤔
Thinking hard
View GitHub Profile
@jai-x
jai-x / sdl_textedit_test.cpp
Last active October 8, 2021 23:12
SDL Text Input IME
#include <cstdio>
#include <cstdlib>
#include <SDL.h>
int main(int argc, char** argv)
{
bool alive = true;
SDL_version v;
SDL_Event e;
SDL_Renderer* r = NULL;
@jai-x
jai-x / example.js
Last active June 3, 2018 15:24
Nodecg context setup
/* Folder structure */
/*
bundles/
my-bundle/
extension/
index.js
util/
nodecg-api-context.js
*/
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Logging;
using osu.Framework.Input;
using osu.Game.Graphics;
namespace osu.Game.Overlays.Music
{
public class PlaylistHandle : Container
{
@jai-x
jai-x / hdmi
Created April 7, 2017 13:43
Simple script to manage HDMI display/audio on Lenovo s20/30 running Linux
#!/bin/bash
# Config to write into .asoundrc
AUDIO_CONFIG="
pcm.!default {
type hw
card 0
device 3
}"
@jai-x
jai-x / 20-intel.conf
Created August 28, 2016 15:18
No tearing on lenovo s20 boys :P
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "AccelMethod" "sna"
Option "TearFree" "true"
EndSection