Skip to content

Instantly share code, notes, and snippets.

View edgarMejia's full-sized avatar
:octocat:
Valiending

Edgar Mejía edgarMejia

:octocat:
Valiending
View GitHub Profile
@DakotaLMartinez
DakotaLMartinez / instructions.md
Last active May 1, 2024 16:40
Adding an SSH key to GitHub (Mac OS X or Linux)

You need to do this if you try this command:

ssh -T git@github.com

and you get something that says

git@github.com: Permission denied (public key).
@codinginflow
codinginflow / MainActivity.kt
Created April 8, 2021 15:54
Circular Determinate ProgressBar with Background and Text Tutorial
package com.codinginflow.circulardeterminateprogressbar
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import kotlinx.android.synthetic.main.activity_main.*
class MainActivity : AppCompatActivity() {
private var progr = 0
override fun onCreate(savedInstanceState: Bundle?) {
@RobinBoers
RobinBoers / elementary OS config.md
Last active February 26, 2024 08:05
My way of configuring and customizing Elementary OS (linux)

Elementary OS config

This is a simple guide for myself about how to replicate my current eOS setup if I ever need to. These are my themes, customazations and tweaks to the OS, categorized and clearly written down for future me if he ever needs it.

Install software

Install updates

Always update when installing an new OS.

@miguelgrinberg
miguelgrinberg / .vimrc
Last active April 4, 2024 19:06
My .vimrc configuration for working in Python with vim
" plugins
let need_to_install_plugins = 0
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
let need_to_install_plugins = 1
endif
call plug#begin()
Plug 'tpope/vim-sensible'
@simme
simme / UITabBarController+ToggleTabBar.swift
Created January 25, 2018 15:36
Extension on UITabBarController for hiding/showing the tab bar.
extension UITabBarController {
/**
Show or hide the tab bar.
- Parameter hidden: `true` if the bar should be hidden.
- Parameter animated: `true` if the action should be animated.
- Parameter transitionCoordinator: An optional `UIViewControllerTransitionCoordinator` to perform the animation
along side with. For example during a push on a `UINavigationController`.
*/
@ibraheem4
ibraheem4 / postgres-brew.md
Last active May 1, 2024 09:43 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@JohnSundell
JohnSundell / CrossPlatformImages.swift
Last active November 22, 2022 06:29
An easy way to make code that uses UIImage cross-platform between iOS/tvOS & macOS
// Either put this in a separate file that you only include in your macOS target
// or wrap the code in #if os(macOS) / #endif
import Cocoa
// Step 1: Typealias UIImage to NSImage
typealias UIImage = NSImage
// Step 2: You might want to add these APIs that UIImage has but NSImage doesn't.
extension NSImage {
@nonproto
nonproto / Keep Fork up to date
Last active April 23, 2019 13:28
Random Git Commands
Keeping a fork up to date
#1. Clone your fork:
git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
2. Add remote from original repository in your forked repository:
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream

This snippet export utf-8 data to csv file that Excel can read.

 import io
 import csv
 from flask import make_response
 
 
 @app.route('/export', methods='GET')
 def export():