Skip to content

Instantly share code, notes, and snippets.

View sdesalas's full-sized avatar
💻

Steven de Salas sdesalas

💻
View GitHub Profile
@sdesalas
sdesalas / App.js
Created April 22, 2019 13:14
Simpsons avatars
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import User from './User';
class App extends Component {
render() {
return (
<div className="App">
@sdesalas
sdesalas / gandalf.css
Created April 4, 2019 13:34 — forked from evadav/gandalf.css
02 - Give style with CSS
body {
font-family: Arial, Helvetica, sans-serif;
}
.gandalf{
position:relative;
max-width: 420px;
height: 500px;
padding: 40px;
@sdesalas
sdesalas / quest.js
Last active April 4, 2019 13:25 — forked from evadav/quest.js
My first application Node.JS
process.stdin.resume()
process.stdin.setEncoding('utf8')
console.log('How old are you ? ')
process.stdin.on('data', (age) => {
console.log('you are' + age.trim() +'years old')
if (age > 99){
console.log ('Too old')
} else if (age < 1) {
console.log ('You have not been born yet')
process.stdin.resume()
process.stdin.setEncoding('utf8')
console.log('How old are you ? ')
process.stdin.on('data', (age) => {
console.log('You are ' + age.trim() + ' years old ')
if (age > 99){
console.log('Too old!!')
} else if (age < 0) {
var assert = require('assert');
var fizzbuzz = require('./fizzbuzz')
assert.equal("fizz", fizzbuzz(3), 'Should return fizz (3)');
assert.equal("fizz", fizzbuzz(6), 'Should return fizz (6)');
assert.equal("fizz", fizzbuzz(18), 'Should return fizz (18)');
assert.equal("buzz", fizzbuzz(5), 'Should return buzz (5)');
assert.equal("buzz", fizzbuzz(10), 'Should return buzz (10)');
assert.equal("buzz", fizzbuzz(25), 'Should return buzz (25)');
process.stdin.resume()
process.stdin.setEncoding('utf8')
console.log('How old are you?')
process.stdin.on('data', function(age) {
console.log('You are ' + age.trim() + ' years old')
if (!Number(age)) {
console.log('eh?')
} else if (age > 99) {
console.log('Too old!')
@sdesalas
sdesalas / index.html
Last active March 28, 2019 16:15 — forked from santiagocodes/index.html
findThePrecious.com MC solution
<!DOCTYPE html>
<html lang="zxx">
<head>
<meta charset="UTF-8">
<title>findThePrecious.com</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
</head>
<body>
<nav>
<ul>
@sdesalas
sdesalas / my_history.log
Created March 19, 2019 23:20
Terminal City Murders
477 cd ../Study/WildCodeSchool/Quests/Unix/clmystery-master
478 cd mystery/
479 ls
480 cat crimescene | grep CLUE
481 cat crimescene | grep CLUE
482 cat crimescene | grep CLUE
483 cd memberships/
484 ls
485 cat AAA
486 cat Delta_SkyMiles
# @see https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-repository
# Remove Docker & update packages
sudo apt-get remove docker docker-engine docker.io && true
sudo apt-get update
# Install tools and HTTPS certificates
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common git
@sdesalas
sdesalas / JNI.cpp
Created November 24, 2018 13:31 — forked from Nimrodda/JNI.cpp
Raw JNI with async callbacks
static jclass callbacksClass;
static jobject callbacksInstance;
JNIEXPORT void JNICALL Java_com_example_NativeClass_nativeMethod(JNIEnv* env, jclass callingObject, jobject callbacks)
{
// Cache the Java callbacks instance
callbacksInstance = env->NewGlobalRef(callbacks);
// Cache the Java callbacks class (in case of interface, this will be the concrete implementation class)
jclass objClass = env->GetObjectClass(callbacks);