Skip to content

Instantly share code, notes, and snippets.

View wilforlan's full-sized avatar
🏠
Working from home

Williams Isaac wilforlan

🏠
Working from home
View GitHub Profile
@wilforlan
wilforlan / php-upper-case-checker.php
Created February 16, 2018 00:13
PHP function that determines if a string starts with an upper-case letter A-Z
<?php
/**
* This class contains sting helper functions.
*
* @package StringHelper
* @author Williams Isaac
* @version 1.0
*/
@wilforlan
wilforlan / using-bs-in-ionic.txt
Created March 13, 2018 10:27
Using bootstrap css inside ionic app
Create a file
> src/assets/scss/tools/_bootstrap.min.scss
Paste this inside
```
/*!
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
@wilforlan
wilforlan / bg_proccess_flow.txt
Created June 14, 2018 00:16
Example of Background Process using Sidekiq in Rails
# gem install sidekiq
# config/sidekiq.yml
---
:environment: production
:verbose: false
:pidfile: ./tmp/pids/sidekiq.pid
:concurrency: 4
:logfile: ./log/sidekiq.log
global._pathfinder = require('./utils/path-finder');
const Sandbox = require(_pathfinder.join(_pathfinder.services, 'code-sandbox/main'));
/**
* Example 1
* Using a single function.
*
*/
var x = (v) => {
return v;
@wilforlan
wilforlan / README.md
Created November 25, 2018 20:50 — forked from jimothyGator/README.md
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/
@wilforlan
wilforlan / silence-info.js
Last active March 9, 2020 22:26
Get the Silence Information of an audio file.
const fs = require('fs');
const readline = require('readline');
const { exec } = require('child_process');
let MATCH_REGEX = /silence_end.*|silence_start.*/gm
const findSilenceParts = (stream, callback, options = {}) => {
return new Promise((resolve, reject) => {
let { overrideRegex } = options
let matches = [];
<html>
<script src="./lib/WebAudioRecorder.js"></script>
<script src="./lib/aws-sdk-2.614.0.min.js"></script>
<script>
Mp3LameEncoderConfig = {
memoryInitializerPrefixURL: "lib/",
TOTAL_MEMORY: 1073741824,
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],