Skip to content

Instantly share code, notes, and snippets.

View seyyah's full-sized avatar

seyyah seyyah

View GitHub Profile
@seyyah
seyyah / export_repo_issues_to_csv.py
Created July 2, 2018 16:14 — forked from unbracketed/export_repo_issues_to_csv.py
Export Issues from Github repo to CSV (API v3)
"""
Exports Issues from a specified repository to a CSV file
Uses basic authentication (Github username + password) to retrieve Issues
from a repository that username has access to. Supports Github API v3.
"""
import csv
import requests
@seyyah
seyyah / gist:8313e9132ac5823c81a46f842d293ea1
Created June 18, 2018 13:37 — forked from l3thal/gist:6836116
docx unique word count
#!/usr/bin/ruby
require 'zip'
require 'nokogiri'
class Docx
def self.word_count(file, zip=Zip::ZipFile.open(file))
Nokogiri::XML.parse(zip.find_entry("word/document.xml").get_input_stream).text.split(" ").uniq.length
end
end
@seyyah
seyyah / .config
Last active May 8, 2018 15:17
NuttX Stm32f429i-disco/fb
#
# Automatically generated file; DO NOT EDIT.
# Nuttx/ Configuration
#
#
# Build Setup
#
# CONFIG_EXPERIMENTAL is not set
# CONFIG_DEFAULT_SMALL is not set
@seyyah
seyyah / cf-ddns.sh
Created March 13, 2018 19:23 — forked from larrybolt/cf-ddns.sh
Automatically update your CloudFlare DNS record to the IP, Dynamic DNS for Cloudflare
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
# Automatically update your CloudFlare DNS record to the IP, Dynamic DNS
# Can retrieve cloudflare Domain id and list zone's, because, lazy
# Place at:
# /usr/local/bin/cf-ddns.sh
@seyyah
seyyah / README.md
Created January 24, 2018 10:42 — forked from joyrexus/README.md
curl tutorial

An introduction to curl using GitHub's API.

Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin

Includes HTTP-Header information in the output

@seyyah
seyyah / subdomain-localhost-rails-5.md
Created October 30, 2017 23:48 — forked from indiesquidge/subdomain-localhost-rails-5.md
how to access subdomains locally with Rails 5

Subdomaining Localhost with Rails 5

I've been following this blog post on how to set up an api-only Rails 5 application. One of the sections talks about creating a subdomain for your api

Rails.application.routes.draw do
  constraints subdomain: "api" do
    scope module: "api" do
@seyyah
seyyah / gist:d8500bb3721a7485785109a19eddf16b
Created October 29, 2017 18:41 — forked from shripadk/gist:552554
Setting up Heroku Hostname SSL with GoDaddy SSL Cert
How to setup Heroku Hostname SSL with GoDaddy SSL Certificate and Zerigo DNS
Heroku recently added an exciting new 'Hostname SSL' option. This option offers the broad compatibility of IP-based SSL, but at 1/5 the price ($20 / month at the time of this writing).
The following tutorial explains how to use Heroku's new 'Hostname SSL' option on your Heroku project. Before we begin, let's list what we're using here:
* Heroku Hostname SSL
* GoDaddy Standard SSL Certificate
* Zerigo DNS
@seyyah
seyyah / Chrome.sh
Created October 9, 2017 06:02 — forked from ibc/Chrome.sh
WebRTC debugging
/Google\ Chrome\ Canary --enable-logging --v=1 --vmodule=*/webrtc/*=2,*/libjingle/*=2,*=-2 --enable-logging=stderr
// Easier:
/Google\ Chrome\ Canary --enable-logging --v=1 --vmodule=*/webrtc/*=2,*=-2 --enable-logging=stderr
@seyyah
seyyah / nginx-502error.conf
Last active August 16, 2017 11:38
HospitalRun Server - DigitalOcean - Docker - Nginx
worker_processes 1;
events { worker_connections 1024; }
http {
upstream website {
server 172.18.0.6:8055;
}
server {

** This Gist is about how to setup a build+upload system to use with MikroC and PICKit 2 v2.55 **

  1. Create a project over MikroC with all of your preferences

  2. Go to the project's base folder and open the %ProjectName%.log

  3. You should see as first line something like this:

0 1 mikroCPIC1618.exe -MSF -DBG -pP18F452 -DL -O11111114 -fo20 -N"F:\development\Trabalhofinal\mikroc\MyProject.mcppi" -SP"C:\Users\Public\Documents\Mikroelektronika\mikroC PRO for PIC\defs" -SP"C:\Users\Public\Documents\Mikroelektronika\mikroC PRO for PIC\uses\P18" -SP"F:\development\Trabalhofinal\mikroc" -SP"C:\Users\mplab\Documents\Trabalhofinal\mikroc" -IP"C:\Users\mplab\Documents\Trabalhofinal\mikroc" -IP"F:\development\Trabalhofinal\mikroc" "start.c" "processor.c" "main.c" "keyboard.c" "__Lib_Math.mcl" "__Lib_MathDouble.mcl" "__Lib_System.mcl" "__Lib_Delays.mcl" "__Lib_CType.mcl" "__Lib_CString.mcl" "__Lib_CStdlib.mcl" "__Lib_CMath.mcl" "__Lib_MemManager.mcl" "__Lib_Conversions.mcl" "__Lib_Sprintf.mcl" "__Lib_PrintOut.mc