Skip to content

Instantly share code, notes, and snippets.

View nicolasguzca's full-sized avatar
Learning, improving, growing, helping

Nick nicolasguzca

Learning, improving, growing, helping
View GitHub Profile
@Esirei
Esirei / auto-next.js
Last active November 16, 2022 16:35
Pluralsight AutoNext Module
let autoNext = () => {
Array.from(document.querySelectorAll('.player-modal.is-active button'))
.filter(b => b.textContent === 'Continue to next module')
.forEach(b => b.click());
};
setInterval(autoNext, 5000);
@mwleinad
mwleinad / CaptionAmazonService.php
Created September 6, 2019 15:22
For those that are looking for a way to create an srt or vtt file from Amazon Transcribe Service
<?php
//Not everything will work out of the box for you, as this is just for our application.
//Framework Laravel
namespace Modules\Caption\Services;
//https://github.com/captioning/captioning
use Captioning\Format\WebvttFile;
use ilos\Models\Caption\CaptionRequest;
use Exception;
@JaeTLDR
JaeTLDR / __ini__t.py
Created January 20, 2019 07:28
10 hours of fun, flask edition
from flask import Blueprint
bp = Blueprint('botfun', __name__)
from app.botfun import botfun
@taivo
taivo / parse-com-anon-auth.js
Last active February 1, 2017 21:32
Anonymous user, anonymous auth with Parse JS SDK
//This is my hackish way to use methods that are already in Parse JS SDK v1.5
//to logIn as an anonymous user. Hackish because it relies on internal methods
//that starts with an underscore and thus subject to change. In any case, it
//helped me move passed authentication and on to the main parts of my project
//and I hope it helps you too.
Parse._getInstallationId().done(
function(installationId){
//
// use installation id because it's already a UUID
cordova plugin add https://github.com/brodysoft/Cordova-SQLitePlugin.git
@spivurno
spivurno / gw-gravity-forms-change-field-id.js
Last active December 12, 2023 01:56
Gravity Wiz // Gravity Forms // Change Field ID via Browser Console
/**
* WARNING! THIS SNIPPET MAY BE OUTDATED.
* The latest version of this snippet can be found in the Gravity Wiz Snippet Library:
* https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-change-field-id.js
*/
/**
* Gravity Wiz // Gravity Forms // Change Field ID via Browser Console
*
* Provides a simple function for changing the ID of a Gravity Forms field via the browser console from the Form Editor page.
*
@ronanguilloux
ronanguilloux / slugify.sh
Last active April 25, 2021 07:17
batch in bash to replace accents in filenames
#! /bin/bash
#
# slugify.sh by Ronan
#
# Distributed under terms of the MIT license.
#
cd photos
for file in *.png; do
filename=${file%.*}
@arunoda
arunoda / gist:7790979
Last active February 16, 2024 14:05
Installing SSHPass

Installing SSHPASS

SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.

Installing on Ubuntu

apt-get install sshpass

Installing on OS X

@BrandonSmith
BrandonSmith / AndroidManifest.xml
Last active July 19, 2023 19:11
Quick example of how to schedule a notification in the future using AlarmManager
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cards.notification">
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
@jonashansen229
jonashansen229 / class.database.php
Last active June 20, 2023 08:41
PHP OOP Database class using MySQLI and Singleton pattern. Only one instance of the class will be made, this requires less memory.
<?php
/*
* Mysql database class - only one connection alowed
*/
class Database {
private $_connection;
private static $_instance; //The single instance
private $_host = "HOSTt";
private $_username = "USERNAME";
private $_password = "PASSWORd";