Skip to content

Instantly share code, notes, and snippets.

View alepmaros's full-sized avatar
:shipit:

Alexandre Maros alepmaros

:shipit:
View GitHub Profile
@alepmaros
alepmaros / colors.py
Created September 3, 2018 16:49
Python Print Colors
def print_format_table():
"""
prints table of formatted text format options
"""
for style in range(8):
for fg in range(30,38):
s1 = ''
for bg in range(40,48):
format = ';'.join([str(style), str(fg), str(bg)])
s1 += '\x1b[%sm %s \x1b[0m' % (format, format)
@alepmaros
alepmaros / 1912.cpp
Created June 23, 2017 20:25
1912.cpp
#include <cstdio>
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <cstdlib>
using namespace std;
#!/bin/bash
sudo apt-get -y install python-software-properties
sudo add-apt-repository "deb http://download.opensuse.org/repositories/security:/OpenVAS:/UNSTABLE:/v5/xUbuntu_12.04/ ./"
sudo apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys BED1E87979EAFD54
sudo apt-get update
@alepmaros
alepmaros / snake.e2
Created January 31, 2017 17:45
The game "Snake" built on Garry's Mod using E2
@name SNAKE!
@inputs E:wirelink Pod:wirelink Seat:entity
@outputs
@persist Bounds:vector2 SnakeSize:vector2 X Y Background:vector2 TICKS GameState Speed
@persist SnakePosition:vector2 FruitPosition:vector2 FruitExists Number_Snakes
@persist SnakeMovements:array CurrentPlayer:entity MenuIndex MenuCredits MaxTicks FirstTime
@trigger all
# Author: http://steamcommunity.com/profiles/76561198000439477/
#
@alepmaros
alepmaros / awesomewm_spotify_notification_fix
Created January 26, 2017 16:55
Change the size of the Spotify notification on awesomewm 4.x
-- Changing spotify notifications.
naughty.config.presets.spotify = {
-- if you want to disable Spotify notifications completely, return false
callback = function(args)
return true
end,
-- Adjust the size of the notification
height = 100,
width = 400,