Skip to content

Instantly share code, notes, and snippets.

View unnamedd's full-sized avatar
🇺🇦
#StandWithUkraine

Thiago Holanda unnamedd

🇺🇦
#StandWithUkraine
View GitHub Profile
@unnamedd
unnamedd / vim_cheatsheet.md
Created April 21, 2019 22:26 — forked from awidegreen/vim_cheatsheet.md
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@unnamedd
unnamedd / mac-apps.md
Created December 4, 2018 10:05 — forked from erikreagan/mac-apps.md
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

@unnamedd
unnamedd / Sequence+GroupByDate.swift
Created October 26, 2018 17:05 — forked from ElegyD/Sequence+GroupByDate.swift
Group a Swift Model by date with auto sorting and asc/desc support (Swift 3) E.g.: for a UITableView with sections
extension Sequence {
func groupSort(ascending: Bool = true, byDate dateKey: (Iterator.Element) -> Date) -> [[Iterator.Element]] {
var categories: [[Iterator.Element]] = []
for element in self {
let key = dateKey(element)
guard let dayIndex = categories.index(where: { $0.contains(where: { Calendar.current.isDate(dateKey($0), inSameDayAs: key) }) }) else {
guard let nextIndex = categories.index(where: { $0.contains(where: { dateKey($0).compare(key) == (ascending ? .orderedDescending : .orderedAscending) }) }) else {
categories.append([element])
continue
}
@unnamedd
unnamedd / NotificationTestCase.swift
Created October 25, 2018 21:34 — forked from fxm90/NotificationTestCase.swift
XCTest - Assert notification (not) triggered.
import XCTest
class NotificationTestCase: XCTestCase {
func testTriggerNotification() {
expectation(forNotification: .fooBar,
object: nil,
handler: nil)
let notificationCenter = NotificationCenter.default
@unnamedd
unnamedd / byobuCommands
Created May 25, 2018 23:07 — forked from jshaw/byobuCommands
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
@unnamedd
unnamedd / 00-about-search-api-examples.md
Created April 19, 2018 14:29 — forked from jasonrudolph/00-about-search-api-examples.md
5 entertaining things you can find with the GitHub Search API
@unnamedd
unnamedd / Twitter API with Curl
Created March 30, 2018 17:28 — forked from apolloclark/Twitter API with Curl
Twitter API with Curl
# create an account, create an app
# @see https://apps.twitter.com/
# retrieve the access tokens
# @see https://dev.twitter.com/oauth/reference/post/oauth2/token
# create the file ~/twitter_api
nano ~/twitter_api
Authorization: OAuth oauth_consumer_key="XXXXXX", oauth_nonce="11111111", oauth_signature="XXXXXX", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1450728725", oauth_token="99999-XXXXXX", oauth_version="1.0"
@unnamedd
unnamedd / FTDI_Basic_Hookup_for_ESP-01.jpg
Created December 19, 2017 00:44 — forked from stonehippo/FTDI_Basic_Hookup_for_ESP-01.jpg
Notes on using the ESP8266 with the Arduino IDE
FTDI_Basic_Hookup_for_ESP-01.jpg
https://www.graph.cool/
https://graphcms.com/
https://scaphold.io/
http://howtographql.com/
https://graphql-docs.com/
http://graphql.com/
http://graphql.org/
https://launchpad.graphql.com/q1n3qqwrp
https://github.com/graphql/graphiql
https://github.com/unnamedd?page=1&tab=stars&utf8=%E2%9C%93&q=graphql
@unnamedd
unnamedd / apns.sh
Last active October 28, 2020 10:12 — forked from greencoder/apns.sh
cURL the APNS HTTP/2 API
# Note: You MUST have curl 7.47+ with http/2 support compiled in
curl -v \
-d '{"aps":{"alert":"<message>","badge":42}}' \
-H "apns-topic: <bundle id>" \
-H "apns-priority: 10" \
--http2 \
--cert <certificate file> \
https://api.development.push.apple.com/3/device/<device token>