Skip to content

Instantly share code, notes, and snippets.

View dcinzona's full-sized avatar
🏠
Working from home

Gustavo Tandeciarz dcinzona

🏠
Working from home
View GitHub Profile
#!/usr/bin/env python3
"""
Author: Teddy Xinyuan Chen
Date: 2020-08-17
"""
from functools import cache
from pathlib import Path
from subprocess import run
import re
@dcinzona
dcinzona / MakePowerShellRememberSSHPassphrase.md
Created December 11, 2021 16:44 — forked from yevhen/MakePowerShellRememberSSHPassphrase.md
How to make Powershell remember the SSH key passphrase.

You should not use the Open SSH client that comes with Git for Windows. Instead, Windows 10 has its own implementation of Open SSH that is integrated with the system. To achieve this:

  1. Start the ssh-agent from Windows Services:
  • Type Services in the Start Menu or Win+R and then type services.msc to launch the Services window;
  • Find the OpenSSH Authentication Agent in the list and double click on it;
  • In the OpenSSH Authentication Agent Properties window that appears, choose Automatic from the Startup type: dropdown and click Start from Service status:. Make sure it now says Service status: Running.
  1. Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell:
git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
@dcinzona
dcinzona / SOQL Queries.sql
Created June 7, 2021 13:45 — forked from sholloway/SOQL Queries.sql
Useful SOQL queries for exploring a Salesforce org.
--------------------------------------------------------------------
-- Queries related to distribution of metadata.
-- Find the number of users per profile.
SELECT count(id), Profile.name
FROM User
WHERE User.IsActive = true
GROUP BY Profile.name
-- Find the distribution of Apex classes per namespace.
select count(id), NameSpacePrefix
@dcinzona
dcinzona / git-branch-to-favicon.js
Created March 26, 2020 15:51 — forked from tigt/git-branch-to-favicon.js
Creates an SVG string that can be used as a favicon across different Git branches. Actually getting this into the browser is sadly project-specific.
const { execSync } = require('child_process')
const { createHash } = require('crypto')
const invertColor = require('invert-color')
const branchName = execSync('git rev-parse --abbrev-ref HEAD')
const hash = createHash('sha256')
hash.update(branchName)
const color = '#' + hash.digest().toString('hex').substring(0, 6)
const invertedColor = invertColor(color, true)

23andme

{
	"name": "23AndMe",
    "desc": "23andMe is a personal genetics service. 23andMe offers individual genome and DNA testing and information. The 23andMe API allows developers to access and integrate the data from 23andMe with other applications and to create new applications. Individuals consent to giving third-party access to the 23andMe data. Some example API methods include accessing user information, retrieving profiles, and getting information on genotypes",
	"url": "https://api.23andme.com",
	"oauth2": {
		"authorize": "/authorize",
@dcinzona
dcinzona / OpenWithVisualStudioCode.bat
Created June 6, 2016 16:17 — forked from nhtera/OpenWithVisualStudioCode.bat
Open folders and files with Visual Studio Code from windows explorer context menu (tested in Windows 10)
@echo off
SET codePath=C:\Program Files (x86)\Microsoft VS Code\code.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Visual Studio Code" /t REG_SZ /v "" /d "Open with Visual Studio Code" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Visual Studio Code" /t REG_EXPAND_SZ /v "Icon" /d "%codePath%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Visual Studio Code\command" /t REG_SZ /v "" /d "%codePath% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Visual Studio Code" /t REG_SZ /v "" /d "Open with Visual Studio Code" /f
@dcinzona
dcinzona / google-weather-api-conditions.xml
Created August 24, 2012 12:14 — forked from bzerangue/google-weather-api-conditions.xml
Google Weather API Conditions List
<?xml version="1.0" encoding="UTF-8"?>
<!--Google Weather API Conditions. Compiled by Dennis Delimarsky, http://dennisdel.com/content/conditions.xml-->
<!--Tweaked by Brian Zerangue, February 1, 2011-->
<conditions>
<type handle="partly-sunny">Partly Sunny</type>
<type handle="scattered-thunderstorms">Scattered Thunderstorms</type>
<type handle="showers">Showers</type>
<type handle="scattered-showers">Scattered Showers</type>
<type handle="rain-and-snow">Rain and Snow</type>
<type handle="overcast">Overcast</type>
@dcinzona
dcinzona / DataManager.h
Created July 18, 2012 11:55 — forked from rojotek/DataManager.h
Core Data singleton manager class capable of being run from a static library - updated for ARC.
// DataManager.h
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
extern NSString * const DataManagerDidSaveNotification;
extern NSString * const DataManagerDidSaveFailedNotification;
@interface DataManager : NSObject {
}
@dcinzona
dcinzona / Xcode4HockeyAppTestFlightintegration.sh
Created April 26, 2012 01:12 — forked from c0diq/Xcode4HockeyAppTestFlightintegration.sh
Automatic TestFlight/HockeyApp Upload XCode Script
#!/bin/bash
#
# (Above line comes out when placing in Xcode scheme)
#
# Inspired by original script by incanus:
# https://gist.github.com/1186990
#
# Rewritten by martijnthe:
# https://gist.github.com/1379127
#
@dcinzona
dcinzona / gist:1628893
Created January 17, 2012 21:11
Creating arbitrarily-colored icons from a black-with-alpha master image (iOS)
// Usage example:
// input image: http://f.cl.ly/items/3v0S3w2B3N0p3e0I082d/Image%202011.07.22%2011:29:25%20PM.png
//
// UIImage *buttonImage = [UIImage ipMaskedImageNamed:@"UIButtonBarAction.png" color:[UIColor redColor]];
// .h
@interface UIImage (IPImageUtils)
+ (UIImage *)ipMaskedImageNamed:(NSString *)name color:(UIColor *)color;
@end