Skip to content

Instantly share code, notes, and snippets.

@superphly
superphly / extrae.c
Last active April 28, 2020 22:52 — forked from Gabriela0890/Extrae
string lenght
void Extrae (string lin) {
string aux;
int cont; // this is setup to be a counting variable
aux = "";
cont = 0;
while ((lin.Substring(cont, 1) != ",") && (cont < lin.Length)) { // basically checking the lengh minus any commas
aux = aux + lin.Substring(cont, 1); // I'm guessing the aux is new string minus any commas?
cont++; // increase the cont var by 1, then loop.
@superphly
superphly / postdownload.sh
Created April 16, 2018 05:59 — forked from sanderploegsma/postdownload.sh
Force CouchPotato rescan after download completion
#! /bin/bash
# postdownload.sh by Sander Ploegsma
{
CP_API_KEY="apikeyhere"
CP_HOST="<ip>:<port>"
echo $(date +%Y-%m-%d\ %H:%M:%S) "Forcing CouchPotato rescan..."
curl --silent -X POST "http://$CP_HOST/api/$CP_API_KEY/renamer.scan" > /dev/null
echo $(date +%Y-%m-%d\ %H:%M:%S) "Done."
}
@superphly
superphly / 0_reuse_code.js
Created October 21, 2016 04:57
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console