Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Coding coding and coding some more

Americo Savinon americos

💭
Coding coding and coding some more
View GitHub Profile
@americos
americos / android.yml
Created Feb 27, 2020 — forked from edvinasbartkus/android.yml
Running Detox tests for Android on Github Actions Workflow
View android.yml
name: Android
on: [push]
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout
@americos
americos / .github-workflows-main.yml
Created Feb 27, 2020 — forked from edvinasbartkus/.github-workflows-main.yml
Github Action for React Native Detox
View .github-workflows-main.yml
name: Detox
on: [push]
jobs:
build:
runs-on: macOS-latest
timeout-minutes: 15
env:
View console.js
// time and time end
console.time("This");
let total = 0;
for (let j = 0; j < 10000; j++) {
total += j
}
console.log("Result", total);
console.timeEnd("This");
// Memory
View gist:6ca6d48a90c4aca1c5596d379001c116
async function getGithubUser(username) { // promise + await keyword usage allowed
try { // We handle async function errors with try / catch
const response = await fetch(`https://api.github.com/users/${username}`); // Execution stops here until fetch promise is fulfilled.
const user = response.json();
return user; // equivalent of resolving the getGithubUser promise with user value.
} catch (err) {
throw new Error(err); // equivalent of rejecting getGithubUser promise with err value.
}
}
View test
/biz/steve-canning-photography/577f0d12fdf47583.html
@americos
americos / SassMeister-input.scss
Last active Aug 29, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
//Width
@each $index, $width in (1: 15%, 2: 30%, 4: 45%) {
.collage-width-#{$index} {
width: $width;
overflow: hidden;
@americos
americos / SassMeister-input.scss
Created Feb 17, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
// Width
@each $index, $width in (1: 15%, 2: 30%, 4: 45%) {
.collage-width-#{$index} {
width: $width;
View gist:001bfbcfe0557ec1bd8c
#!/usr/bin/env ruby
# List all keys stored in memcache.
# Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place.
require 'net/telnet'
headings = %w(id expires bytes cache_key)
rows = []
View gist:084c3ff32653783b5d40
[alias]
co = checkout
a = add
s = show
st = status
d = diff
ds = diff --staged
ci = commit
br = branch
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short