Skip to content

Instantly share code, notes, and snippets.

View atilberk's full-sized avatar

Atılberk Çelebi atilberk

  • Koç University, Bogazici University, Dogma Alares
  • Istanbul, Turkey
  • X @eseginkulagi
View GitHub Profile
@atilberk
atilberk / adjust_brightness.sh
Last active May 23, 2023 18:58
A simple shell script for Ubuntu to adjust screen brightness
#!/bin/sh
# Usage:
# sh /path/to/adjust_brightness.sh [up|down|<an integer between 0-100>]
# Requires the change of ownership of the baclight file to the user
# Run this once to change the ownership:
# "sudo chown $(whoami):$(whoami) /sys/class/backlight/intel_backlight/brightness"
@atilberk
atilberk / resize-workspace.sh
Created March 13, 2016 21:54
A little shell script for expanding and shrinking workspaces
#!/bin/sh
# Usage:
# ./resize-workspace.sh [expand|shrink]
command=$1
vsize=$(dconf read /org/compiz/profiles/unity/plugins/core/vsize)
hsize=$(dconf read /org/compiz/profiles/unity/plugins/core/hsize)
total=$((hsize * vsize))
@atilberk
atilberk / temp-indicator.py
Last active November 22, 2019 00:23
An CPU/GPU temperature indicator in for Ubuntu
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# I am using this to monitor my cpu's temperature in the top bar of my os
# I have tested the script on Ubuntu 15.10 with Python 2.7.10
# Update: I used to require acpi but then found a simpler way
import sys,time,re,commands,os
from gi.repository import Gtk, GLib
@atilberk
atilberk / KUSIS-GPA-Calculator.html
Last active February 8, 2024 21:59
Simple JS GPA Calculator for Koç University Students.
<html>
<head>
<meta charset="UTF-8">
<title>KUSIS GPA Calculator</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
<script type="text/javascript">
var cues = {
"Course Description Term Grade Units Status Incl GPA":'Chrome',
"Course Description Term Grade Units Status Incl GPA":'Firefox',