Skip to content

Instantly share code, notes, and snippets.

View juan-fdz-hawa's full-sized avatar
🏠
Working from home

Juan Fernandez juan-fdz-hawa

🏠
Working from home
  • Self-employed
  • Dominican Republic
View GitHub Profile
(function () {
'use strict';
function CashSaleContractFormController(
DropdownService,
mixpanelService,
NavService,
$http,
$anchorScroll,
_) {
@juan-fdz-hawa
juan-fdz-hawa / README.md
Created February 28, 2017 15:53 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

For more about AWS and AWS Certifications you can follow me @leonardofed


//Sets up a array to contain the x and y coordinates
double[] xy = new double[2];
xy[0] = 0;
xy[1] = 0;
//An array for the z coordinate
double[] z = new double[1];
z[0] = 1;
//Defines the starting coordiante system
ProjectionInfo pStart = KnownCoordinateSystems.Geographic.World.WGS1984;
//Defines the ending coordiante system
@juan-fdz-hawa
juan-fdz-hawa / shp2gj.py
Created November 19, 2016 12:04 — forked from frankrowe/shp2gj.py
PyShp, shp to geojson in python
import shapefile
# read the shapefile
reader = shapefile.Reader("my.shp")
fields = reader.fields[1:]
field_names = [field[0] for field in fields]
buffer = []
for sr in reader.shapeRecords():
atr = dict(zip(field_names, sr.record))
geom = sr.shape.__geo_interface__
buffer.append(dict(type="Feature", \
from wsgiref.simple_server import make_server
from urllib.parse import parse_qs
DATA_STORE = {}
def setter(qs, start_response, headers):
# Some questions/observations:
# - What to do with empty values? (Here I'm just ignoring them)
# - I just assumed it was OK to store vectors instead of scalars because
/*
* This class is part of the book "iText in Action - 2nd Edition"
* written by Bruno Lowagie (ISBN: 9781935182610)
* For more info, go to: http://itextpdf.com/examples/
* This example only works with the AGPL version of iText.
*/
using System;
using System.IO;
using System.Collections.Generic;
using System.Text;
@juan-fdz-hawa
juan-fdz-hawa / hn_seach.js
Created November 3, 2016 22:10 — forked from kristopolous/hn_seach.js
hn job query search
function query() {
var
// HN is done with very unsemantic classes.
job_list = Array.prototype.slice.call(document.querySelectorAll('.c5a,.cae,.c00,.c9c,.cdd,.c73,.c88')),
query_list = Array.prototype.slice.call(arguments),
shown = 0, total = job_list.length;
// Traverses up the dom stack trying to find a match of a specific class
function up_to(node, klass) {
if (node.classList.contains(klass)) {
import struct
fmt = '<3s3sHH'
with open('filter.gif', 'rb') as fp:
img = memoryview(fp.read())
header = img[:10]
bytes(header)
#b'GIF89a+\x02\xe6\x00'
struct.unpack(fmt, header)
#(b'GIF', b'89a', 555, 230)
Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -recurse |
Get-ItemProperty -name Version,Release -EA 0 |
Where { $_.PSChildName -match '^(?!S)\p{L}'} |
Select PSChildName, Version, Release, @{
name="Product"
expression={
switch($_.Release) {
378389 { [Version]"4.5" }
378675 { [Version]"4.5.1" }
378758 { [Version]"4.5.1" }
SELECT name, default_version, installed_version, left(comment,30) As comment
FROM pg_available_extensions
WHERE installed_version IS NOT NULL
ORDER BY name;