Skip to content

Instantly share code, notes, and snippets.

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);
uint16_t xval=0;
double senal=0;
int ypre=0;
void setup() {
@sebassdc
sebassdc / taller2_Hurtado.cpp
Created March 9, 2017 04:18
Taller de segundo corte, programacion1
#include <iostream>
#include <cstdlib>
// Agregar soporte para compilar en linux
#define LIN
// #define WIN
using namespace std;
// Declaracion de funciones
void clear();
void eqline();
@sebassdc
sebassdc / Hurtado.cpp
Last active March 10, 2017 01:04
Taller para entrega 09/03/2017 prog1
#include <iostream>
#include <cstdlib>
// Agregar soporte para compilar en linux
// #define LIN
#define WIN
using namespace std;
// Declaracion de funciones
void clear();
void eqline();
@sebassdc
sebassdc / getline.cpp
Created March 27, 2017 23:27
Modo de leer cadenas completas en c++
#include <iostream>
#include <string>
using namespace std;
int main (void)
{
string s;
cin.getline((char*)s.c_str(), 256);
cout << s.c_str();
system("PAUSE");
#include <iostream>
using namespace std;
string reverse(string cadena) {
string alveres;
for (int i = cadena.length() -1; i >= 0; i--){
cout << "f " << i << endl;
alveres += cadena.at(i);
}
return alveres;
@sebassdc
sebassdc / cbzfix.py
Last active November 15, 2022 01:51
A little script to fix numbering on cbz (comic book zip files)
#!/usr/bin/python
import os, sys, zipfile
import shutil
def renamed(string):
fp, sp = string.split('.')
new_fp = fp.zfill(4)
return new_fp + '.' + sp
@sebassdc
sebassdc / tricks_linux.md
Last active January 19, 2019 04:27
A compendium of usefull linux stuff

Tricks linux

Convert flac to mp3

First install this packages

sudo apt-get install flac
sudo apt-get install lame

Then run this command on your songs folder

curl -sS 'https://s3.amazonaws.com/dolartoday/data.json' | python -c "import sys, json; print json.load(sys.stdin)['USD']['transferencia']" > usd.txt
@sebassdc
sebassdc / progresive_bar.js
Last active December 13, 2017 05:07
[Progresive Bar] This is a port to javascript from https://gist.github.com/rougier/c0d31f5cbdaac27b876c#file-progress_bar-py #Javascript
//@ts-check
const progress = ({
value,
length=40,
title = " ",
vmin=0.0,
vmax=1.0,
progressive = false
}) => {
import React, { Component } from 'react'
import CLink from '../General/CLink'
import Logo from '../../assets/Logo.svg'
import LogoResponsive from '../../assets/Responsive-logo.png'
import instLogo from '../../assets/Instagram-white.svg'
import HamburgerImg from '../../assets/hamburguer.svg'
import './NavBar.css'
const StyledLink = ({className, ...props}) =>
<CLink