Skip to content

Instantly share code, notes, and snippets.

View harveyconnor's full-sized avatar
💭
React Native

Harvey Connor harveyconnor

💭
React Native
View GitHub Profile
@keeguon
keeguon / countries.json
Created April 5, 2012 11:11
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'},
@aheckmann
aheckmann / storeImgInMongoWithMongoose.js
Created April 17, 2012 19:14
store/display an image in mongodb using mongoose/express
/**
* Module dependencies
*/
var express = require('express');
var fs = require('fs');
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
// img path
@spleenteo
spleenteo / svg_in_ai.md
Created March 1, 2013 21:34
Understanding SVG working with Adobe Illustrator

Understanding SVG working with Adobe Illustrator

Here some simple notes of things I discover understanding svg world, created with adobe illustrator.

IDs

Every svg tag can have an ID, usefull to set CSS style or to work with javascript. In AI, layers are basically groups of object. Every object can be named in the layer box and that name will be the id of the relative tag.

<g id=”nome-sub-layer”>

@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
@jaredreich
jaredreich / timezones.json
Last active December 4, 2023 16:37
JSON Timezone List
[
   {
      "value": -12,
      "text": "(GMT -12:00) Eniwetok, Kwajalein"
   },
   {
      "value": -11,
      "text": "(GMT -11:00) Midway Island, Samoa"
   },
   {
@gauravtiwari
gauravtiwari / window-auth-popup.es6.js
Last active April 12, 2024 00:56
Promise based popup window for server oAuth
/* global window */
const popup = (url) => {
const windowArea = {
width: Math.floor(window.outerWidth * 0.8),
height: Math.floor(window.outerHeight * 0.5),
};
if (windowArea.width < 1000) { windowArea.width = 1000; }
if (windowArea.height < 630) { windowArea.height = 630; }
@pygy
pygy / cancelPromise.md
Last active May 9, 2024 13:27
You can already cancel ES6 Promises

The gist: by having a Promise adopt the state of a forever pending one, you can suspend its then handlers chain.

Promise.pending = Promise.race.bind(Promise, [])

let cancel

new Promise(function(fulfill, reject) {
  cancel = function() {fulfill(Promise.pending())}
  setTimeout(fulfill, 1000, 5)
@parshap
parshap / react-native-fonts.md
Last active April 20, 2023 13:27
Fonts in React Native

Fonts in React Native

Default Fonts

A number of fonts are available by default based on the platform (e.g., Roboto on Android, Helvetica on iOS). See the full list here.

@smuda
smuda / SetupSSHForwardingOnQNAP.md
Created November 19, 2017 04:26
Setup SSH forwarding on QNAP NAS

On receiving NAS:

setcfg LOGIN "SSH AllowTcpForwarding" TRUE
reboot

On client to forward local port 8443 to the QNAP admin interface:

ssh user@host -L 8443:localhost:443
@xujiaao
xujiaao / android-set-ntp-server.md
Last active July 22, 2024 03:51
Set the NTP server of your android device
tags
Android
Android Things

Set the NTP server of your android device