Skip to content

Instantly share code, notes, and snippets.

View triztian's full-sized avatar

Tristian A. triztian

View GitHub Profile
@triztian
triztian / gen-ssh-keys.md
Last active November 4, 2023 11:47
DigitalOcean Generate SSH keys

Adding SSH Keys to Droplets

How it Works

You can add SSH keys to DigitalOcean which can then be selected during the droplet create process to add the selected SSH keys under the root user.

When using SSH keys a root password will no longer be set as SSH keys will be used as the preferred method of access.

We do not manage the server after creation, so editing, adding, or removing SSH keys from the SSH interface will not affect any of the stored keys on droplets that you have created.

@triztian
triztian / osx-for-hackers.sh
Last active April 20, 2017 17:46 — forked from matthewmueller/osx-for-hackers.sh
OSX For hackers
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
@triztian
triztian / SortingNumbers.java
Last active April 20, 2017 17:46
Sorting Numbers Java
import java.io.*;
import java.util.*;
public class SortingNumbers {
// Define the name of the file
private static final String FILE = "sorting.txt";
public static void main( String args[] ) throws IOException {
File file = new File(FILE);
diff --git a/atom/renderer/lib/web-view/web-view.coffee b/atom/renderer/lib/web-view/web-view.coffee
index 3a56310..eee4a75 100644
--- a/atom/renderer/lib/web-view/web-view.coffee
+++ b/atom/renderer/lib/web-view/web-view.coffee
@@ -199,12 +199,24 @@ registerBrowserPluginElement = ->
proto = Object.create HTMLObjectElement.prototype
proto.createdCallback = ->
+
@setAttribute 'type', 'application/browser-plugin'
diff --git a/atom/browser/web_view_guest_delegate.cc b/atom/browser/web_view_guest_delegate.cc
index 8e1810c..3608c87 100644
--- a/atom/browser/web_view_guest_delegate.cc
+++ b/atom/browser/web_view_guest_delegate.cc
@@ -21,7 +21,7 @@ const int kDefaultHeight = 300;
} // namespace
WebViewGuestDelegate::WebViewGuestDelegate()
- : guest_opaque_(true),
+ : guest_opaque_(false),
@triztian
triztian / menu.c
Last active February 29, 2016 21:31
An example of a simple C menu.
#include <stdio.h>
#include <conio.h>
int main(void) {
char option = -1; // Inicializar a un valor default
option = getch();
switch ( option ) {
case 'a':
@triztian
triztian / pyramid.go
Created October 13, 2017 03:41
SDGophers Meetup 2017-10-12 Challenge
package main
import (
"fmt"
"io/ioutil"
"log"
"os"
"sort"
"strconv"
"strings"
package main
import (
"database/sql"
"log"
"time"
_ "github.com/alexbrainman/odbc"
)
@triztian
triztian / main.cpp
Last active May 29, 2018 04:50
A simple gist showing processing of a textfile
#include <set>
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
struct user {
std::string name;
std::string email;
std::string password;
""
"""
set number
let mapleader = "\\"
set exrc
set secure
nnoremap <F10> :nohlsearch<cr>