Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View alejandrolechuga's full-sized avatar
🤯
Focusing

neptuno alejandrolechuga

🤯
Focusing
View GitHub Profile
password
123456
12345678
1234
qwerty
12345
dragon
pussy
baseball
football
function construct(constructor, args) {
function F() {
return constructor.apply(this, args);
}
F.prototype = constructor.prototype;
return new F();
}
// Sanboxer
function sandboxcode(string, inject) {
"use strict";
@alejandrolechuga
alejandrolechuga / oauth.js
Created November 18, 2016 15:24 — forked from keiver/oauth.js
Get Authentication header with OAuth using oauth-1.0a and crypto-js
import OAuth from 'oauth-1.0a';
import CryptoJS from 'crypto-js';
/**
* oAuthHeader - Get Authentication header with OAuth.
*
* @param {string} url Request URL
* @param {string} method HTTP method.
* @return {object} Authentication header object
*/
// clamp
// 10 al 100
// 9 -> 10
// 199 -> 100
// 50 -> 50
// min 5
// max 100
function limitarCompra(numArticulos) {
// DeepGet
let resp = {
collection: [
{
name: 'batman',
metadata: {
rating: 'PG-14',
year: 1985
}
},
// proxies es6
var empleado = {
nombre: '',
apellido: '',
password: '32ioi4o24'
};
// empleado.nombre = 'alejandro';
// sort
var pokemons = [
{ name:'pickachu', level: 50 } ,
{ name:'bulbasour', level: 10 } ,
{ name:'snorlax', level: 1 } ,
{ name:'mew', level: 2 } ,
{ name:'abra', level: 150 }
];
// var numbers = [2, 34, 10, 2, 5, 1];
console.log(pokemons.sort(function (prev, next) {
{
"_type":"collection",
"id":"102454",
"href":"https://discover.huluqa.com/content/v5/view_hubs/home/collections/102454?is_fallback=true&schema=0&personalized_layout_id=H4sIAAAAAAAAAMu1MjIwMjAEAiNDA4OakmIrQzMDU0MjCxMDA0MzIwBQBVmNHwAAAA==",
"p13n_href":"https://discover.huluqa.com/content/v5/me/state?schema=0&eab_ids=EAB::3c23c44c-7065-4c4e-9b83-822f150eabeb::60390994::1805285,EAB::dbd1a1ab-3622-4a41-983d-c3890aee7874::NULL::NULL,EAB::b306a9c9-7696-43c1-905e-8995519b9b42::NULL::NULL,EAB::62d9ff97-90d9-402b-be0a-47555a7c767b::60610758::6871325,EAB::76437bdb-5dda-4631-a693-f58867b6fd80::60610756::6858294,EAB::cec63bd0-6d33-4516-9aa7-35881365dd35::NULL::NULL&bowie_context=cover_story",
"name":"Red Hue Test",
"theme":"medium_horizontal_details",
"description":"",
"artwork":{
/* jshint esnext: true */
// Nullish Coalescing Operator
// operando1 ?? operando2
// operando1 || operando2
class Persona {
constructor(datos) {
this.nombre = datos.nombre;
this.segundoNombre = datos.segundoNombre ?? 'DESCONOCIDO';
this.apellido = datos.apellido;
diff --git a/lexer/src/lib.rs b/lexer/src/lib.rs
index 45d6b38..88495f9 100644
--- a/lexer/src/lib.rs
+++ b/lexer/src/lib.rs
@@ -163,11 +163,22 @@ where I: Iterator<Item = char>,
// matches constructs beginning with a digit, e.g. 0.123 or 10e+42
fn digit(&mut self) -> Result<TokenType, LexError> {
let mut s = String::new();
+ // is digit 0
+ // is the next thing x