Skip to content

Instantly share code, notes, and snippets.

View example.cpp
#include <example.h>
void my_data_type::set_some_data(int value) {
this->m_some_data = value;
}
int my_data_type::some_data() {
return this->m_some_data;
}
View discord-canary-install.sh
#!/bin/bash -xe
[ "$(id -u)" == "0" ] || (echo needs root; exit -1)
{
APPLICATIONS_DIR="/usr/local/share/applications"
set -e
cd /tmp
curl -L 'https://discordapp.com/api/download/canary?platform=linux&format=tar.gz' -o discord-canary.tar.gz
cd /usr/share
mkdir -p discord-canary
View fix-discord-light-a-bit.css
/* This document is available under public domain and is free for use by anyone and everyone. Go nuts */
[class*="item-"],
[class*="markup-"],
[class*="headerBar-"] > [class*="title-"],
[class*="embedDescription-"],
[class*="iconForeground-"],
[class*="category-"],
[class*="defaultColor-1-"],
[class*="selectable-"],
@ArsenArsen
ArsenArsen / flarebot.py
Last active Feb 9, 2018
FlareBot self hoster. Requires Fedora or Gentoo, uses python3.6. UNSUPPORTED. DO NOT BOTHER THE OFFICIAL GUILD FOR HELP
View flarebot.py
#!/usr/bin/env python3
# vim: set syntax=python shiftwidth=4 expandtab softtabstop=4 :
"""Assistance in self hosting your very own FlareBot instance.
UNSUPPORTED AND UNOFFICIAL
Usage:
./flarebot install
Sets up everything needed,
View lol.cpp
#define NOT_GNU_SOURCE /* fuck yea c ++ ++ ++ ++ +--- code !111 */ /* fuck yea c ++ ++ ++ ++ +--- code !111 */ /* fuck yea c ++ ++ ++ ++ +--- code !111 */ /* fuck yea c ++ ++ ++ ++ +--- code !111 */
#define _CANCER 100% /* fuck yea c ++ ++ ++ ++ +--- code !111 */ /* fuck yea c ++ ++ ++ ++ +--- code !111 */ /* fuck yea c ++ ++ ++ ++ +--- code !111 */ /* fuck yea c ++ ++ ++ ++ +--- code !111 */
#define lol "lol" /* fuck yea c ++ ++ ++ ++ +--- code !111 */ /* fuck yea c ++ ++ ++ ++ +--- code !111 */ /* fuck yea c ++ ++ ++ ++ +--- code !111 */ /* fuck yea c ++ ++ ++ ++ +--- code !111 */
/* fuck yea c ++ ++ ++ ++ +--- code !111 */ /* fuck yea c ++ ++ ++ ++ +--- code !111 */ /* fuck yea c ++ ++ ++ ++ +--- code !111 */ /* fuck yea c ++ ++ ++ ++ +--- code !111 */
#include <iostream> /* fuck yea c ++ ++ ++ ++ +--- code !111 */ /* fuck yea c ++ ++ ++ ++ +--- code !111 */ /* fuck yea c ++ ++ ++ ++ +--- code !111 */ /* fuck yea c ++ ++ ++ ++ +--- code !111 */
#include <stdio.h> /* fuck yea c ++ ++ ++ ++ +--- code !111 *
@ArsenArsen
ArsenArsen / README.md
Last active Apr 26, 2020
owo uploader for KShare
View README.md

Put the following into the $SETTINGS_DIR/uploaders/whats-this.uploader and restart
You can access settings directory through the button on the settings window

$SETTINGS_DIR is:
Unix: $HOME/.config/KShare OR $XDG_CONFIG_DIR/KShare
Windows: C:/Users/<USER>/AppData/Local
MacOS: ~/Library/Preferences
@ArsenArsen
ArsenArsen / ddgeverywhere.js
Last active Mar 9, 2018
DuckDuckGo Everywhere Tampermonkey Script
View ddgeverywhere.js
// ==UserScript==
// @name no google pls
// @version 0.1
// @description ddg pls dad
// @author Arsen
// @include *://www.google.*/*
// @grant none
// ==/UserScript==
(function(){'use strict';let p=(q=>{if(!q){return{};}return(/^[?#].+/.test(q)?q.slice(1):q).split('&').reduce((ps,p)=>{let[k,v]=p.split('=');ps[k]=v?(v.replace(/\+/g,' ')):'';return ps;},{});});let s=p(location.search).q;if(!s){s=p(location.hash).q;}if(!s){return;}location.href='https://duckduckgo.com/?q='+s;})();
@ArsenArsen
ArsenArsen / youtube2mpd.sh
Last active Mar 29, 2017
Turns a YouTube video/playlist into an MPD track. Caches for offline use in your music library. Requires mpc, zenity, youtube-dl, and notify-send.
View youtube2mpd.sh
#!/bin/bash
cd /media/arsen/RIPWindows/Music # Music library path
function video {
echo "Processing $1"
TITLE=`youtube-dl -J -i $1 | jq -r .title`
if [[ ! -f "$TITLE.mp3" ]]
then
if youtube-dl -o "%(title)s.%(ext)s" -x --audio-format mp3 --add-metadata $1
then
mpc update "$TITLE.mp3" --wait
View ps1.sh
function parseBranch() {
BRANCH="$(git rev-parse --symbolic-full-name --abbrev-ref HEAD 2>/dev/null)"
if [ ! "${BRANCH}" == "" ]
then
echo " [$BRANCH]";
fi
}
function parseExitCode() {
CODE=$?
if [ ! "${CODE}" == "0" ]
@ArsenArsen
ArsenArsen / README.md
Last active Jul 19, 2017
Installer for vim, the way I like it.
View README.md

Steps to install, on GNU/Linux distros only:

  • Install git
  • Install vim
  • Set up fontconfig (if fc-config runs youre already all set)
  • Copy the raw link of install.sh
  • Run:
curl RAW_URL | bash