Skip to content

Instantly share code, notes, and snippets.

@alexewerlof
alexewerlof / fetch-response-header.js
Last active February 22, 2023 16:59
converting fetch response headers to a plain javascript object
const fetch = require('node-fetch')
const am = require('am')
async function main() {
const url = 'https://www.example.com'
const response = await fetch(url)
const responseHeaders = Object.fromEntries(resp.headers.entries())
console.dir(responseHeaders)
return responseHeaders
}
@gabrielemariotti
gabrielemariotti / README.md
Last active February 24, 2021 10:52
How to manage the support libraries in a multi-module projects. Thanks to Fernando Cejas (http://fernandocejas.com/)

Centralize the support libraries dependencies in gradle

Working with multi-modules project, it is very useful to centralize the dependencies, especially the support libraries.

A very good way is to separate gradle build files, defining something like:

root
  --gradleScript
 ----dependencies.gradle
@rogchap
rogchap / RCDropdown.h
Created August 21, 2013 02:58
Simple native iOS dropdown using UITextFiled
#import <UIKit/UIKit.h>
@interface RCDropdown : UITextField
@property (nonatomic) id<UIPickerViewDelegate> pickerDelegate;
@property (nonatomic) id<UIPickerViewDataSource> pickerDataSource;
@end
@kerrishotts
kerrishotts / ui-gestures.js
Created July 20, 2012 08:20
Simple Gesture Recognition
/*jshint asi:true, forin:true, noarg:true, noempty:true, eqeqeq:false, bitwise:true, undef:true, curly:true, browser:true, devel:true, smarttabs:true, maxerr:50 */
/******************************************************************************
*
* UI-GESTURES
* Author: Kerri Shotts
* Version: 0.1 alpha
* License: MIT
*
* A simple, no-frills gesture recognizer. Permits long-press recognition,
* horizontal swipe recognition, and vertical swipe recognition. Recognizing