[user] | |
name = Froilán Irizarry Rivera | |
email = | |
signingkey = | |
[core] | |
excludesfile = ~/.gitignore_global | |
editor = nano | |
quotepath = false |
alias findbin='find . -type f -not -path "./.git/*" -exec perl -MFile::Basename -e '\''print (-T $_ ? "" : (fileparse ($_, qr/\.[^.]*/))[2] . "\n" ) for @ARGV'\'' {} + | sort | uniq' |
const { Octokit } = require('@octokit/rest'); | |
const { throttling } = require('@octokit/plugin-throttling'); | |
const OctokitThrottling = Octokit.plugin(throttling); | |
const octokit = new OctokitThrottling({ | |
auth: "your-token", | |
throttle: { | |
onRateLimit: (retryAfter, options) => { | |
octokit.log.warn( |
This is a quick and simple example on how we can use a template engine to create markdown strings for use in GitHub issues or Jira ticket.
Eta.js is a templating engine that embbeds Javascript syntax into the template it self. It seems super lite weight.
When working with issues and PRs, a ton of the code we do are the message templates themselves. I think that extracting this into a template engine will clean up the business logic from the view logic (sound familiar 😉).
This guide on how to convert an SVN repository to a git repository was mostly taken from John Albin Wilkins post on Converting a Subversion repository to Git.
:
Prompt one
Company: Acme computers
Version control platform(s): Many GitHub Enterprise instances installed throughout the company by different teams. Acme Computers is trying to standardize on GitHub Enterprise and consolidate their GitHub usage onto a single instance. The company has many instances of other Git hosting solutions installed as well. Some are fully supported applications. Other instances are on machines under people's desks.
Customer requests:
- Shrink large repository: Acme wants GitHub to help them shrink the large repository to a more manageable size that is performant for common Git operations. The large repo is a project that is high visibility with an aggressive roadmap. They request that we help them within the month. It's a large, monolithic repository.
const fetch = require('node-fetch'); | |
const encoding = require('encoding'); | |
fetch('https://open.gsa.gov/code.json') | |
.then(response => response.buffer()) | |
.then(json => { | |
let text = {}; | |
if(json.indexOf('\uFEFF', 0, 'utf16le') === 0 ) { | |
text = encoding.convert(json, 'utf8', 'utf16le'); |
#!/usr/bin/env sh | |
# This code is based on https://eang.it/letsencrypt-with-amazon-cloudfront/ | |
export AWS_ACCESS_KEY_ID="" | |
export AWS_SECRET_ACCESS_KEY="" | |
bucket_name="" | |
region="" | |
distribution_id="" | |
domain="" |
from rest_framework.exceptions import NotFound | |
def not_available_api_version(excluded_api_versions=None): | |
def decorator(func): | |
@wraps(func) | |
def wrapper(x, request, *args, **kwargs): | |
if excluded_api_versions and request.version in excluded_api_versions: | |
raise NotFound(detail=None) | |
return func(x,request, *args, **kwargs) |