- 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 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') |
The [debug][debug] module for Node.js is one of the most useful utilities when it comes to high-level debugging. The only problem with using it, would that the module eventually becomes a hard dependency in your project. Your project will NOT run if the package is not installed despite the fact that it is only needed in development mode.
One way to work around this to have a dummy function used in place of the real debug function, when users are in production mode.
var debug = process.env.DEBUG ? require("debug")("MyProject:Server") : function() {};
This way, the module is only loaded when the DEBUG environment variable is set. Therefore, the package can be added as a devDependency
to the project's package.json
rather than as a dependency
.
This file contains 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
import re | |
import glob | |
import subprocess | |
from os.path import exists | |
from sys import exit | |
INPUT_FOLDER = 'input/' | |
OUTPUT_FOLDER = 'output/' |
This file contains 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
echo "<?php include('openvpn.inc'); openvpn_resync_all();?>" | php -q |
This file contains 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
<?php | |
/** | |
* Description of VideoStream | |
* | |
* @author Rana | |
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial | |
*/ | |
class VideoStream | |
{ | |
private $path = ""; |
This file contains 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
import "phoenix_html" | |
import "bootstrap" | |
import "jquery" | |
import "toastr" | |
// ... |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
import base64 | |
import json | |
import random | |
import re | |
import time | |
try: | |
from Crypto import Random | |
from Crypto.Cipher import AES, PKCS1_v1_5 | |
from Crypto.PublicKey import RSA |
NewerOlder