Skip to content

Instantly share code, notes, and snippets.

View djalmabright's full-sized avatar

Djalma Bina djalmabright

View GitHub Profile
<?php
/**
* Coin Dashboard by Christian Haschek
* https://blog.haschek.at
*
* Donations always welcome
* BTC: 1ChrisHMgr4DvEVXzAv1vamkviZNLPS7yx
* ETH: 0x1337C2F18e54d72d696005d030B8eF168a4C0d95
*
* Read more at
@djalmabright
djalmabright / github.gql
Created September 29, 2017 20:48 — forked from alexandreaquiles/github.gql
Consulta GraphQL que busca estatísticas do projeto Express: o número de stars, de pull requests abertos, de issues abertas, a data da última release e informações do último commit.
query {
repository(owner:"expressjs", name: "express") {
stargazers {
totalCount
}
pullRequests(states: OPEN) {
totalCount
}
issues(states:OPEN) {
totalCount
@djalmabright
djalmabright / gist:0547cf2297104463901675d5e11bda3d
Created September 28, 2017 19:03 — forked from erinata/gist:5489247
Gemfile.lock example 2
GEM
remote: https://rubygems.org/
specs:
actionmailer (3.2.13)
actionpack (= 3.2.13)
mail (~> 2.5.3)
actionpack (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
builder (~> 3.0.0)
@djalmabright
djalmabright / index.html
Created September 14, 2017 21:52
Pow! CSS only SVG animation
<div class="center">
<div class="center__image">
<!-- svg -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="background" width="800" height="600" viewBox="0 0 800 600">
<defs>
<clipPath id="clip-path">
<path d="M489,194.27C345,169.72,288,261,288,300c0,40.49,57,130.08,201,105.53,5.43-.93,10.42-1.8,15-2.64V196.7C499.42,195.86,494.43,195.19,489,194.27Z" style="fill: none"/>
</clipPath>
</defs>
<g class="artwork" id="artwork" data-name="artwork">
@djalmabright
djalmabright / basic-portfolio-filtering-system-jquery-ui-ux-css-grid.markdown
Created September 14, 2017 21:51
Basic Portfolio Filtering System // jQuery // UI/UX // CSS Grid

Basic Portfolio Filtering System // jQuery // UI/UX // CSS Grid

This is a very simple filtering system using jQuery class switching. It could also be done with vanilla JavaScript. The grid is created using CSS Grid Layout. This filter is a good starting place to do some cool things.

I often need just a basic filter for portfolios or categories and it's nearly impossible to find a plugin that just works. So I created one. Feel free to use it in your projects.

Update: This is fully responsive now. I fixed some of the issues with scrolling and padding.

A Pen by Djalma Bina on CodePen.

<!DOCTYPE html>
<html>
<head>
<script src="https://npmcdn.com/react@0.14.2/dist/react.min.js"></script>
<script src="https://npmcdn.com/react-dom@0.14.2/dist/react-dom.min.js"></script>
<script src="https://npmcdn.com/google-map-react@0.14.6/dist/GoogleMapReact.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.place{
/*!
* jQuery JavaScript Library v1.7.1
* http://jquery.com/
*
* Copyright 2011, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
import urllib2
import json
key = "[your API key]"
while 1:
zip = raw_input('For which ZIP code would you like to see the weather forecast? ')
url = 'http://api.wunderground.com/api/' + key + '/geolookup/forecast10day/q/' + zip + '.json'
f = urllib2.urlopen(url)
json_string = f.read()
parsed_json = json.loads(json_string)
for day in parsed_json['forecast']['simpleforecast']['forecastday']: