Skip to content

Instantly share code, notes, and snippets.

View elyalvarado's full-sized avatar

Ely Alvarado elyalvarado

  • Kitchener, ON, Canada
View GitHub Profile
@0xabad1dea
0xabad1dea / copilot-risk-assessment.md
Last active September 11, 2023 10:21
Risk Assessment of GitHub Copilot

Risk Assessment of GitHub Copilot

0xabad1dea, July 2021

this is a rough draft and may be updated with more examples

GitHub was kind enough to grant me swift access to the Copilot test phase despite me @'ing them several hundred times about ICE. I would like to examine it not in terms of productivity, but security. How risky is it to allow an AI to write some or all of your code?

Ultimately, a human being must take responsibility for every line of code that is committed. AI should not be used for "responsibility washing." However, Copilot is a tool, and workers need their tools to be reliable. A carpenter doesn't have to

@souzagab
souzagab / OpenSSL-Fix.md
Last active December 24, 2023 06:26
Install OpenSSL 1.0.2 via Homebrew ( Fix for older Ruby Versions )

How to fix openSSL incompatibility issues in older Ruby Versions. (<=2.3)

Homebrew

Install openssl 1.0.2 via homebrew :

brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/64555220bfbf4a25598523c2e4d3a232560eaad7/Formula/openssl.rb -f

This should install openssl in /usr/local/opt/openssl

If you already have 1.1 installed, you should have 2 versions of opensll in: /user/local/opt/

@kentcdodds
kentcdodds / create-reducer-context.js
Created May 8, 2019 16:27
Just some fun idea I had and don't want to lose.
// src/count-context.js
import React from 'react'
function countReducer(count, action) {
const {step = 1} = action
switch (action.type) {
case 'INCREMENT': {
return count + step
}
default: {
@jdnichollsc
jdnichollsc / ABC.md
Last active September 18, 2024 05:06
The Job Interview Guide

The Job Interview Guide 💼

And English is a Work in Progress ⌛

@slorber
slorber / Lazy.js
Created April 23, 2018 15:30
Lazy react native comp
import React from 'react';
import {InteractionManager, ActivityIndicator} from 'react-native';
import {View} from 'glamorous-native';
const DefaultLoader = (
<View padding={20} alignItems="center" justifyContent="center">
<ActivityIndicator size="large"/>
</View>
);
@damienlaughton
damienlaughton / UIAccessorizedTextField.swift
Created March 28, 2018 15:16
UIAccessorizedTextField is an iOS friendly alternative to the drop down list
//
// UIAccessorizedTextField.swift
// AccessorizedTextField
//
// Created by Damien Laughton on 28/03/2018.
// 2018 Mobilology Limited. No rights reserved.
//
import Foundation
import UIKit
@maxivak
maxivak / __readme.md
Last active February 19, 2021 19:30
Provisioning Remote server accessible by SSH with Chef and knife-zero

Provisioning remote server accessible by SSH with Chef and knife-zero.

We have a server(node) accessible by SSH. We want to provision using Chef recipes stored on our local chef repo.

We will use gem knife-zero.

Find an example of Chef repo here.

knife-zero

@chrpinedo
chrpinedo / insert-signature-in-pdf.md
Created April 4, 2016 10:27
How to insert your signature in a PDF file by using PDFtk

How to insert your signature in a PDF file by using PDFtk

Your signature in all the sheets

  1. convert the signature image to PDF file
convert firma.png firma.pdf
@uchcode
uchcode / calling_osascript_from_ruby.rb
Last active December 17, 2020 21:10
calling osascript from ruby
require "open3"
def osascript language, script
Open3.capture3 "osascript", *["-l", language, :stdin_data => script]
end
def applescript script
osascript "AppleScript", script
end
@firefightingcode
firefightingcode / UILabel+Spacing.swift
Created November 26, 2015 15:02
An extension for UILabel to set text with specific kerning, line spacing or line height multiple
import UIKit
extension UILabel {
func setText(text: String, withKerning kerning: Double) {
self.attributedText = NSAttributedString(string: text, attributes: kerningAttribute(kerning))
}
func setText(text: String, withLineSpacing lineSpacing: CGFloat) {
self.attributedText = NSAttributedString(string: text, attributes: lineSpacingAttribute(lineSpacing))