Skip to content

Instantly share code, notes, and snippets.

View rohshall's full-sized avatar

Salil Wadnerkar rohshall

  • United States
View GitHub Profile
@nbyouri
nbyouri / brightness.c
Last active November 21, 2022 04:07
Get/Set screen brightness value on NetBSD
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/sysctl.h>
#include <inttypes.h>
bool device_enabled(char *);
char *find_device(void);
int get_brightness(char *);
@ytjohn
ytjohn / crash.log
Created March 11, 2016 14:28
nouveau
(EE) Backtrace:
(EE) 0: /usr/bin/X (xorg_backtrace+0x4e) [0x55ace80e168e]
(EE) 1: /usr/bin/X (mieqEnqueue+0x253) [0x55ace80c3373]
(EE) 2: /usr/bin/X (QueuePointerEvents+0x52) [0x55ace7f9d152]
(EE) 3: /usr/lib/xorg/modules/input/evdev_drv.so (0x7f8f1747a000+0x60a7) [0x7f8f174800a7]
(EE) 4: /usr/lib/xorg/modules/input/evdev_drv.so (0x7f8f1747a000+0x687d) [0x7f8f1748087d]
(EE) 5: /usr/bin/X (0x55ace7f2d000+0x96ac8) [0x55ace7fc3ac8]
(EE) 6: /usr/bin/X (0x55ace7f2d000+0xbfc92) [0x55ace7fecc92]
(EE) 7: /lib/x86_64-linux-gnu/libc.so.6 (0x7f8f20a53000+0x352f0) [0x7f8f20a882f0]
(EE) 8: /lib/x86_64-linux-gnu/libc.so.6 (ioctl+0x7) [0x7f8f20b50067]
@jinyeow
jinyeow / bspwmrc
Last active November 7, 2022 13:30
Config files related to bspwm and panel (lemonbar)
#!/bin/zsh
ws1= # main
ws2= # web
ws3= # mail
ws4= # code
ws5= # math [infinity]  (term icon)
ws6= # media
ws7= # misc  (9 squares icon)
ws8= # notes/docs  (pdf icon)
@JeffPaine
JeffPaine / i3-cheat-sheet.md
Last active April 14, 2025 15:08
i3 Window Manager Cheat Sheet

i3 Window Manager Cheat Sheet

$mod refers to the modifier key (alt by default)

General

  • startx i3 start i3 from command line
  • $mod+<Enter> open a terminal
  • $mod+d open dmenu (text based program launcher)
  • $mod+r resize mode ( or to leave resize mode)
  • $mod+shift+e exit i3
Go to onedrive.com and sign-in with your Microsoft account. While you are logged in, drag a PDF file from the desktop onto the OneDrive website to upload it.
After the PDF file is uploaded, double-click to open the PDF file in the Word online app. Remember you are looking at the PDF file and it is not editable yet.
Click the Edit in Word button to open the PDF file for editing. Say yes when OneDrive asks for your permissions to convert the PDF into Word format (it makes a copy so your original PDF is unaltered).
Once the file is converted to PDF, click the Edit button to open the converted document in the Word app for editing.
Since you now editing the PDF as a standard Word document, you can edit it to your heart’s content. You can add images, change the logo, modify the text or apply different formatting, add tables and more. Once you are done, go to the File menu and choose Save As to download it as a PDF file again.
@alghanmi
alghanmi / curl_example.cpp
Created May 5, 2014 20:12
cURL C++ Example
#include <iostream>
#include <string>
#include <curl/curl.h>
static size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp)
{
((std::string*)userp)->append((char*)contents, size * nmemb);
return size * nmemb;
}
@akottr
akottr / Maven.sublime-build
Last active August 1, 2022 06:47
For maven build put this file into ~/.config/sublime-text-3/Packages/User. Choose Tools -> Build System -> Maven. Ctrl+Shift+ P shows the entries (e.g mvn clean)
{
"working_dir": "$file_path",
"shell_cmd":"mvn clean install",
"variants": [
{
"name": "mvn clean install",
"shell_cmd": "mvn clean install"
},
{
"name": "mvn full build",
@arttuladhar
arttuladhar / Convert.java
Created June 28, 2013 20:37
Converts resultSet to HashMap of Strings and Objects
/**
* <h2> Converts ResultSet to HashMap of List<String,Object></h2>
* @param row
* @param rs_SubItemType
* @throws SQLException
*/
private static void getHashMap( List<Map<String, Object>> row, ResultSet rs_SubItemType) throws SQLException {
ResultSetMetaData metaData = rs_SubItemType.getMetaData();
@qbit
qbit / gist:5483415
Last active February 25, 2024 13:35
KSH support for git-prompt
# ksh git prompt support
#
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]>
# Distributed under the GNU General Public License, version 2.0.
#
# This script allows you to see repository status in your prompt.
#
# To enable:
#
# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh).