This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.JOptionPane; | |
import java.util.Arrays; | |
import java.util.Map; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Iterator; | |
int gridSpacing = 32; | |
int[] numCells = {0, 0}; | |
int[] playerPos = {0, 0}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Remember to change your username */ | |
/* @import url('file:///home/USERNAME/.cache/wal/colors.css'); */ | |
#tabbrowser-tabs .tabbrowser-tab[selected] .tab-content { | |
background: #f5f4f0 !important; | |
border-radius: 12px; | |
padding-right: 3px; | |
padding-left: 3px; | |
padding-top: 2px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "Backing up existing config files if any..." | |
if [ -d "$HOME/.config/openbox" ]; then | |
cp -r "$HOME/.config/openbox" "$HOME/.config/openbox.bak" | |
rm -r "$HOME/.config/openbox" | |
fi | |
mkdir ~/.config/openbox |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## Put it into /usr/bin as "sound" so you can type snazzy commands like "sound up" and "sound down" | |
get_active_sink() { | |
local is_running=$(pactl list sinks | grep RUNNING); # empty if nothing is playing | |
if [ -z $is_running ]; then # nothing is playing; get the highest-number sink (the one which was plugged in last, which you're most likely to be using.) | |
local index_line_no=$(pactl list sinks | tac | awk '/State: SUSPENDED/{print NR + 1};') | |
IFS=' ' read -ra line_no_arr <<< "$index_line_no" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<meta charset='UTF-8'> | |
<head> | |
<div class='blackout'> | |
It appears you're using a mobile browser to view our site. Sadly, the HackerBlocks editor is desktop-only. Please visit this page in a desktop browser to do the challenge. | |
</div> | |
<style> | |
.blackout { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
FGCOLOR='f5f4f0' | |
BGCOLOR='555555' | |
BG_ALPHA='51' | |
max_len=50 | |
Clock() { | |
#TIME=$(date "+%S seconds past %H%M") | |
TIME=$(date "+%H%M+%S") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NAME = main | |
CC ?= gcc # don't override CC if one is already set, or if the user has already set one | |
CFLAGS := -Wall -Wextra -Wunreachable-code | |
OBJ = main.o string_utils.o lmc.o | |
HEADER = string_utils.h lmc.h | |
OUTPUT_NAME = a.out | |
$(NAME): $(OBJ) | |
$(CC) -o $(OUTPUT_NAME) $(CFLAGS) $(OBJ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Copyright © 2021 Siddharth Singh | |
The MIT License | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from __future__ import annotations | |
import copy | |
import datetime | |
import os | |
import re | |
import statistics | |
import subprocess |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The MIT License (MIT) | |
Copyright © 2021 Siddharth Singh | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the “Software”), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |