Skip to content

Instantly share code, notes, and snippets.

View molinto's full-sized avatar
🎯
Focusing

Sharry Stowell molinto

🎯
Focusing
  • Molinto
  • United Kingdom
View GitHub Profile
@mrk-han
mrk-han / emulator-install-using-avdmanager.md
Last active April 16, 2024 14:43
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architecture (for an M1/M2 Macbook):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-30;google_atd;arm64-v8a"

@mathieuletyrant
mathieuletyrant / config.yml
Created November 23, 2018 12:44
circleCI config with Sentry
# Release new release on sentry
sentry-release:
working_directory: ~/repo
docker:
- image: circleci/node:10.11
steps:
- checkout
- run:
name: Install Sentry cli
command: curl -sL <https://sentry.io/get-cli/> | bash
@kevinyan815
kevinyan815 / .gitlab-ci.yml
Last active January 20, 2020 10:55
A full configured gitlab ci config demo
stages:
- build
- test
- deploy
before_script:
- mkdir -p ~/.ssh
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' > /root/.ssh/id_rsa
- chmod -R 600 ~/.ssh
- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts #make sure remote servers's ssh host keys are verified
@80xer
80xer / sinon-practices.js
Created July 10, 2017 09:24
sinon practices
'use strict';
import sinon from 'sinon';
import chai from 'chai';
const assert = chai.assert;
const Database = {
save: (user, cb) => {
cb();
},
@smching
smching / app_mqtt.js
Last active June 25, 2022 08:09
Node.js application: Subscribe to all topics of a MQTT broker
var mqtt = require('mqtt');
var Topic = '#'; //subscribe to all topics
var Broker_URL = 'mqtt://192.168.1.123';
var options = {
clientId: 'MyMQTT',
port: 1883,
keepalive : 60
};
@javilobo8
javilobo8 / download-file.js
Last active April 9, 2024 12:01
Download files with AJAX (axios)
axios({
url: 'http://localhost:5000/static/example.pdf',
method: 'GET',
responseType: 'blob', // important
}).then((response) => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'file.pdf');
document.body.appendChild(link);
@molinto
molinto / activeCampaignAPI3.txt
Created April 19, 2016 11:21
Active Campaign API v3
API v3 known endpoints:
[GET with SESSION]
https://SUBDOMAIN.api-us1.com/api/3/tags
https://SUBDOMAIN.api-us1.com/api/3/tags/1
https://SUBDOMAIN.api-us1.com/api/3/contacts
https://SUBDOMAIN.api-us1.com/api/3/contacts/7
https://SUBDOMAIN.api-us1.com/api/3/deals
@mauriciord
mauriciord / app.js
Last active January 26, 2017 12:56
Facebook request
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
//requestify
var requestify = require('requestify');
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
Byobu is a suite of enhancements to tmux, as a command line
tool providing live system status, dynamic window management,
and some convenient keybindings:
F1 * Used by X11 *
Shift-F1 Display this help
F2 Create a new window
Shift-F2 Create a horizontal split
Ctrl-F2 Create a vertical split
Ctrl-Shift-F2 Create a new session