Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
DOWNLOAD_DIR="download"
RED='\033[0;31m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
printf "${BLUE}[INFO]${NC} Creating download directory: \"$DOWNLOAD_DIR\"\n"
mkdir -p $DOWNLOAD_DIR
SOURCE_FILE="source.html"
printf "${BLUE}[INFO]${NC} Downloading source of \"$1\"\n"
@k11m1
k11m1 / recursive.cpp
Created May 10, 2018 16:04
V2 squares - recursive
#include <iostream>
int squares(int x, int y)
{
if(x==y)
{
return 1;
}
if(x>y)
#include <iostream>
int main()
{
int x = 5;
int y = 7;
std::cout << "Enter X: ";
std::cin >> x;
std::cout << "Enter Y: ";
#include <ctime>
#include <iostream>
int main() {
time_t t = std::time(nullptr);
int n;
std::cout << "Enter [int] days: ";
std::cin >> n;
t+=n*60*60*24;
std::cout << t << '\n';
Fontconfig warning: line 5: unknown element "its:rules"
Fontconfig warning: line 6: unknown element "its:translateRule"
Fontconfig error: line 6: invalid attribute 'translate'
Fontconfig error: line 6: invalid attribute 'selector'
Fontconfig error: line 7: invalid attribute 'xmlns:its'
Fontconfig error: line 7: invalid attribute 'version'
Fontconfig warning: line 9: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/10-hinting-slight.conf", line 5: invalid attribute 'translate'
import os
import sys
#VARIABLES
disk = "/dev/sda"
hostname = "linux"
passwd = "archlinux"
debug = False
def exec( command ):
"Execute the command with os.system"
import os
import sys
#VARIABLES
disk = "/dev/sda"
debug = False
def exec( command ):
"Execute the command with os.system"
if debug == True:
@k11m1
k11m1 / main.cpp
Created October 27, 2017 11:27
#2
#include <SDL2/SDL.h>
#include <iostream>
#include <vector>
#include <stdlib.h>
#include <time.h>
void DrawRec(SDL_Renderer* renderer, SDL_Rect r)
{
SDL_SetRenderDrawColor( renderer, 0, 0, 255, 255 );
SDL_RenderFillRect( renderer, &r );
#include <SDL2/SDL.h>
#include <iostream>
#include <vector>
#include <stdlib.h>
#include <time.h>
void DrawRec(SDL_Renderer* renderer, SDL_Rect r)
{
SDL_SetRenderDrawColor( renderer, 0, 0, 255, 255 );
SDL_RenderFillRect( renderer, &r );