- Use this wizard to create or select a project in the Google Developers Console and automatically turn on the API. Click Continue, then Go to credentials.
- On the Add credentials to your project page, click the Cancel button.
- At the top of the page, select the OAuth consent screen tab. Select an Email address, enter a Product name (Mega Account Creator) if not already set, and click the Save button.
- Select the Credentials tab, click the Create credentials button and select OAuth client ID.
- Select the application type Other, enter the name "Mega Account Creator", and click the Create button.
- Click OK to dismiss the resulting dialog.
- Click the Download JSON button to the right of the client ID.
- Move this file to your working directory and rename it client_secret.json.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* A quick reminder on how to use Promises with Node and Express in order to run potentially | |
* time-consuming jobs asynchronously (assuming the jobs are able to run in the background thanks to | |
* libuv and actually return Promises). | |
* | |
* Start the server, navigate to /startjob, then refresh a few times, the job should be in progress. | |
* You can navigate elsewhere in the "app" in other browser tabs in the meanwhile (/). After about | |
* 20s, you should get a result by refreshing the tab where you originally submitted the job. | |
* | |
* I hope this pattern will be useful e.g. for processing images with the `sharp` library (see | |
* <http://sharp.dimens.io>). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from jsonrpclib import Server as ServerProxy | |
import base64 | |
import jsonrpclib | |
import json | |
class AdminTrytonException(Exception): | |
def __init__(self, result): | |
self.result = result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable @typescript-eslint/ban-types */ | |
// @ts-nocheck | |
/** | |
* Use to patch all functions/methods in a class and make them print out run time | |
* in ms to the console. | |
* | |
* This decorator will only patch functions declared in the target class. | |
* It will **not** patch functions reside in the **base class**. | |
* Dynamically created functions or functions received from the outside as input |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[CmdletBinding()] Param ( | |
[Parameter(Mandatory=$true)][ValidateSet('Off', 'On')][string]$BluetoothStatus | |
) | |
If ((Get-Service bthserv).Status -eq 'Stopped') { Start-Service bthserv } | |
Add-Type -AssemblyName System.Runtime.WindowsRuntime | |
$asTaskGeneric = ([System.WindowsRuntimeSystemExtensions].GetMethods() | ? { $_.Name -eq 'AsTask' -and $_.GetParameters().Count -eq 1 -and $_.GetParameters()[0].ParameterType.Name -eq 'IAsyncOperation`1' })[0] | |
Function Await($WinRtTask, $ResultType) { | |
$asTask = $asTaskGeneric.MakeGenericMethod($ResultType) | |
$netTask = $asTask.Invoke($null, @($WinRtTask)) | |
$netTask.Wait(-1) | Out-Null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python | |
from nyaa import nyaa | |
import guessit | |
import click | |
@click.command() | |
@click.argument("nyaa_user") | |
@click.option("--num_page", default=10, help="Numero de paginas rss a obtener") | |
def fetch_nyaa_user(nyaa_user, num_page): | |
""" obtiene de nyaa (rss) todos las series y hace batchs de torrents """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python | |
""" | |
use the api token from jira: https://id.atlassian.com/manage-profile/security/api-tokens | |
# add to ~/.bashrc | |
export JIRA_API_TOKEN="" | |
export JIRA_USER="" | |
export JIRA_URL="https://myjira.atlassian.net/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# this script born about the needs of implement a virus scanner for files using a api rest. | |
# then using https://github.com/benzino77/clamav-rest-api/ and https://dokkupose.netlify.app | |
# I create this script to deploy the api rest | |
## | |
### dokku apps:destroy clamav-service && dokku apps:destroy clamav-apirest && dokku network:destroy clamav-net | |
# Let's create a network bridge to communicate | |
dokku apps:create clamav-service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from colorconsole import terminal | |
BLANCO = 'blanco' | |
NEGRO = 'negro' | |
VACIO = "" | |
TRenglon = range(0,9) | |
TColumna = ["A","B","C","D","E","F","G","H"] | |
screen = terminal.get_terminal() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pdfminer.pdfparser import PDFParser | |
from pdfminer.pdfdocument import PDFDocument | |
from pdfminer.pdftypes import resolve1 | |
# I exported the comments I had made in an Adobe Reader DC document to f:temp/stn.fdf. | |
# Now I wanted to access those comments outside of the Adobe Reader. Here is how I extracted the comments. | |
fdf_file = open("F:/temp/stn.fdf", 'rb') |
NewerOlder