Skip to content

Instantly share code, notes, and snippets.

View Shinkei's full-sized avatar
🐕
On the internet nobody knows you are a doggo

Jorge Ramírez Shinkei

🐕
On the internet nobody knows you are a doggo
  • air up
  • Germany
View GitHub Profile
@Shinkei
Shinkei / System Design.md
Created December 14, 2021 13:45 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@Shinkei
Shinkei / .fnote.sh
Created March 8, 2021 15:15
terminal command for taking notes
#!/usr/bin/env bash
set -e
main() {
previous_file="$1"
file_to_edit=`select_file $previous_file`
if [ -n "$file_to_edit" ] ; then
"$EDITOR" "$file_to_edit"
main "$file_to_edit"
// Production steps of ECMA-262, Edition 6, 22.1.2.1
if (!Array.from) {
Array.from = (function () {
var toStr = Object.prototype.toString;
var isCallable = function (fn) {
return typeof fn === 'function' || toStr.call(fn) === '[object Function]';
};
var toInteger = function (value) {
var number = Number(value);
if (isNaN(number)) { return 0; }
'''
A password is complex enough, if it meets all of the following conditions:
its length is at least 5 characters;
it contains at least one capital letter;
it contains at least one small letter;
it contains at least one digit.
Determine whether a given password is complex enough.
/*
Implement a function that can divide two fractions and produce a reduced fraction.
Example
For a = [2, 3] and b = [5, 6], the output should be
fractionDivision(a, b) = [4, 5].
*/
function fractionDivision(a, b) {
let fraction = [a[0] * b[1], a[1] * b[0]];
@Shinkei
Shinkei / ChangeWallpaper.txt
Last active May 5, 2018 18:33
changewallpaper
https://www.nationalgeographic.com/photography/photo-of-the-day/_jcr_content/.gallery.json | jq '.items[0]'
"url": "https://yourshot.nationalgeographic.com",
y dentro esta a lista de los tamaños que es .items[0].sizes["2048"]
script wget $(curl https://www.nationalgeographic.com/photography/photo-of-the-day/_jcr_content/.gallery.json | jq -r '.items[0].url + .items[0].sizes["2048"]')
use std::process::Command;
use std::env;
use std::str;
const IMAGE_PATH: &'static str = "/.natgeo-img/photo-of-the-day.jpg";
const NATGEO_JSON: &'static str = "https://www.nationalgeographic.com/photography/photo-of-the-day/_jcr_content/.gallery.json";
fn main() {
download_image();
F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F
F F F F F F F F F F F F F F F F F F F F F
F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F
F F F F F F F F F F F F F F F F F F F F F F F F F
F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F
@Shinkei
Shinkei / fizzbuzz.py
Created July 27, 2017 16:56
fizzbuzz python
#Your optional code here
#You can import some modules or create additional functions
def checkio(number):
#Your code here
#It's main function. Don't remove this function
#It's using for auto-testing and must return a result for check.
if number < 0:
return "%d is not dicisible by 3 or 5"
.hidden{
display: none;
}