Skip to content

Instantly share code, notes, and snippets.

View nicholastay's full-sized avatar

Nicholas Tay nicholastay

View GitHub Profile
// cc -w -include time.h -o qlock qlock.c // MIT Copyright (c) Tsoding
char*s="// cc -w -include time.h -o qlock qlock.c // MIT Copyright (c) Tsoding\n"
"char*s=\"?\";x,y,d[8],i,dx;f[]={31599,19812,14479,31207,23524,29411,29679,\n"
"30866,31727,31719,1040};char*so,*si;p(ch){i=x/2/(3+2);dx=x/2%(3+2);if(i<8&&(y-5)\n"
"/2<5&&dx<3&&(f[d[i]]>>((5-(y-5)/2-1)*3+dx))&1)printf(\"\\033[1;41;30m%c\\033[0m\",ch\n"
");else printf(\"%c\",ch);if(ch=='\\n'){y+=1;x=0;}else x+=1;}gd(){time_t t=time(NULL);struct\n"
" tm*tm=localtime(&t);d[0]=tm->tm_hour/10;d[1]=tm->tm_hour%10;d[2]=10;d[3]=tm->tm_min\n"
"/10;d[4]=tm->tm_min%10;d[5]=10;d[6]=tm->tm_sec/10;d[7]=tm->tm_sec%10;}main(){for\n"
"(gd();;printf(\"\\n\\033[%dA\\033[%dD\",y+1,x),sleep(1),gd())for(so=s,x=0,y=0;*so;so++\n"
")if(*so==63)for(si=s;*si;si++)switch(*si){case'\\n':p('\\\\');p('n');p('\"');p('\\n')\n"
@frafra
frafra / mbox2html.py
Last active February 22, 2025 03:24
Mailbox to HTML conversion using Python 3 + Jinja2 in less than 100 lines (including GPLv3 license)
#!/usr/bin/env python3
#
# Copyright (C) 2016 - Francesco Frassinelli
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@rauchg
rauchg / README.md
Last active April 13, 2025 04:29
require-from-twitter
@crapier
crapier / Kissanime_cleaner.md
Last active November 11, 2024 22:25
Userscript for removing bloat from KissAnime site, also adds random features.

KissAnime Cleaner

You guys may have noticed but I've not been updating this for a while and a few pieces are broken. Feel free to update this on your own if you want to or to use Juici's Fork, which he has kindly been keeping more up to date.

This userscript for KissAnime was made for my personal use to remove large chunks of the site that I do not use, including any options to login or use features only for members. Along the way I ended up adding some other small features listed below.

Features

  • Removes any link, tabs, buttons, pages, etc. that I will never use.
  • Also removes ads on any pages that still remain
@kmorcinek
kmorcinek / .gitignore
Last active April 25, 2025 17:25
.gitignore for C# projects
# The following command works for downloading when using Git for Windows:
# curl -LOf http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore
#
# Download this file using PowerShell v3 under Windows with the following comand:
# Invoke-WebRequest https://gist.githubusercontent.com/kmorcinek/2710267/raw/ -OutFile .gitignore
#
# or wget:
# wget --no-check-certificate http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore
# User-specific files
@natyusha
natyusha / readme.txt
Created March 8, 2012 11:01
foo_ncmpcpp_mod readme
most recent readme: https://gist.github.com/2000446
//This skin really isn't completely ready for a release.
//It is tailored towards my way of tagging files and is made for last.fm users.
To install unpack and move folder contents into foobar2000 installation directory.
Also, be sure to delete user_profiles_enabled from said directory.
Open foobar2000 goto 'Preferences>Display/Columns UI/Main'
Click import and import 'foo_ncmpcpp_mod.fcl' from the 'skins/masood_' folder.
Make sure to install the included fonts.

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@tsabat
tsabat / zsh.md
Last active April 21, 2025 07:22
Getting oh-my-zsh to work in Ubuntu