Skip to content

Instantly share code, notes, and snippets.

View shemmjunior's full-sized avatar
🎯
Focusing

Shemm Junior shemmjunior

🎯
Focusing
View GitHub Profile
@shemmjunior
shemmjunior / CountryCodes.json
Created March 27, 2022 07:07 — forked from anubhavshrimal/CountryCodes.json
Country and Dial or Phone codes in JSON format
[
{
"name": "Afghanistan",
"dial_code": "+93",
"code": "AF"
},
{
"name": "Aland Islands",
"dial_code": "+358",
"code": "AX"
@shemmjunior
shemmjunior / scroll_instagram.js
Created October 22, 2021 04:41 — forked from LoranKloeze/scroll_instagram.js
Automatic scroll of Instagram page, stop scrolling by hand...
/*
Tired of scrolling to one of the last photos on the page on Instagram? Let your
browser do the scrolling for you!
31-05-2017
(c) 2017 - Loran Kloeze - loran@ralon.nl
Usage
- Go to https://www.instagram.com/instagram_handle/ (change instagram_handle in i.e. taylorswift)
- Open up the console (F12) (Firefox users: type 'allow pasting' if you haven't done so yet)
- Select the contents of this complete file and copy/paste it to the console and hit enter
@shemmjunior
shemmjunior / animals.json
Created October 10, 2021 19:03 — forked from borlaym/animals.json
Array of animal names
[
"Aardvark",
"Albatross",
"Alligator",
"Alpaca",
"Ant",
"Anteater",
"Antelope",
"Ape",
"Armadillo",
const cors = require('cors')
// Set `useWhitelist` to `false` if you want to accept all requests.
const config = {
useWhitelist: true
}
// Define from which origins requests are allowed.
const whitelist = [
// 'https://fiddle.jshell.net',
@shemmjunior
shemmjunior / countries.json
Created October 3, 2021 06:49 — forked from keeguon/countries.json
A list of countries in JSON
[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},
@shemmjunior
shemmjunior / app.component.ts
Created August 17, 2021 10:21 — forked from kksrini89/app.component.ts
Downloading file in Angular - from Node.js
downloadFile(token: string, url: string) {
try {
let headers = new HttpHeaders()
.set(
'Authorization',
`Bearer ${token}`
)
.set('Accept', 'text/csv');
this.http
.get(`${url}`, {
@shemmjunior
shemmjunior / hide-header.directive.ts
Created August 11, 2021 11:49 — forked from klemensz/hide-header.directive.ts
Hide header on scroll in Ionic 5
import { Directive, HostListener, Input, OnInit, Renderer2 } from '@angular/core';
import { DomController } from '@ionic/angular';
/**
* Moves away the header when scrolling down.
*/
@Directive({
selector: '[appHideHeader]',
})
export class HideHeaderDirective implements OnInit {
@shemmjunior
shemmjunior / setup.sh
Created July 29, 2021 13:11 — forked from tolleiv/setup.sh
CMUSphinx (tutorial) setup
#!/bin/bash
# see http://cmusphinx.sourceforge.net/wiki/tutorialam
# see http://mnemonicplace.blogspot.de/2010/06/cmu-sphinx-error-wave2feat-error-while.html
sudo apt-get install build-essential autoconf libtool automake python-dev subversion bison vim
export PATH=/usr/local/bin:/usr/local/libexec/sphinxtrain:$PATH
export LD_LIBRARY_PATH=/usr/local/lib
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
mkdir ~/tutorial
cd ~/tutorial
@shemmjunior
shemmjunior / monitoring_binary_logs.js
Created July 4, 2021 10:09 — forked from Rowadz/monitoring_binary_logs.js
Monitoring binary logs via Nodejs
const mysql = require('mysql');
const MySQLEvents = require('@rodrigogs/mysql-events');
const ora = require('ora'); // cool spinner
const spinner = ora({
text: '🛸 Waiting for database events... 🛸',
color: 'blue',
spinner: 'dots2'
});
const program = async () => {