Skip to content

Instantly share code, notes, and snippets.


Alex Maslakov jmas

Block or report user

Report or block jmas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jmas / Colorful-Language.markdown
Created Sep 13, 2019 — forked from mattnico/Colorful-Language.markdown
A Javascript function to calculate a unique color for any English word.
View Colorful-Language.markdown

Colorful Language

This Javascript will calculate a unique color for any English word typed into it. Currently other alphabets are not supported. Punctuation and white space are ignored.

A Pen by Matt Nicolaysen on CodePen.


View send.php
// process form
// respond as HTML with updated state
jmas / app.js
Last active Jul 11, 2019
View app.js
import React, { useState } from 'react';
export default function App({ data }) {
const [ text, setText ] = useState(data.isChecked);
const [ error, setError ] = useState(null);
const [ isSuccess, setIsSuccess ] = useState(false);
const [ inProgress, setInProgress ] = useState(false);
function submitForm() {
jmas / 666_lines_of_XSS_vectors.html
Created Apr 4, 2019 — forked from JohannesHoppe/666_lines_of_XSS_vectors.html
666 lines of XSS vectors, suitable for attacking an API copied from
View 666_lines_of_XSS_vectors.html
<img src=1 href=1 onerror="javascript:alert(1)"></img>
jmas / LiquidCrystal_I2C_esp8266.cpp
Created Feb 5, 2019
LiquidCrystal I2C for ESP8266
View LiquidCrystal_I2C_esp8266.cpp
#include <LiquidCrystal_I2C.h>
// Set the LCD address to 0x27 for a 16 chars and 2 line display
LiquidCrystal_I2C lcd(0x3F, 16, 2);
void setup()
// initialize the LCD
// lcd.begin(); // Init with pin default ESP8266 or ARDUINO
lcd.begin(0, 2); //ESP8266-01 I2C with pin 0-SDA 2-SCL
// Turn on the blacklight and print a message.
jmas / i2c_address_scanner_arduino_esp8266.cpp
Created Feb 5, 2019
I2C address scanner Arduino (ESP8266) sketch
View i2c_address_scanner_arduino_esp8266.cpp
// --------------------------------------
// i2c_scanner
// Version 1
// This program (or code that looks like it)
// can be found in many places.
// For example on the forum.
// The original author is not know.
// Version 2, Juni 2012, Using Arduino 1.0.1
jmas / domain-age.php
Created Jan 9, 2019 — forked from SaptakS/domain-age.php
PHP code to find Domain Age of a domain
View domain-age.php
$domain = $_GET['domain'];
$w = new DomainAge();
echo $w->age($domain);
class DomainAge
private $WHOIS_SERVERS = array(
"com" => array("", "/Creation Date:(.*)/"),
"net" => array("", "/Creation Date:(.*)/"),
jmas / send.php
Created Jan 5, 2019 — forked from webag/send.php
Добавление контакта и сделки в amocrm
View send.php
$responsible_user_id = 7292136; //id ответственного по сделке, контакту, компании
$lead_name = 'Заявка с сайта'; //Название добавляемой сделки
$lead_status_id = '11331793'; //id этапа продаж, куда помещать сделку
$contact_name = $cname; //Название добавляемого контакта
$contact_phone = $cphone; //Телефон контакта
jmas / google_script_sheet_api.js
Last active Nov 2, 2018
Google script sheet API
View google_script_sheet_api.js
function createSheetApi(sheetName) {
var doc = SpreadsheetApp.getActiveSpreadsheet();
var sheet = doc.getSheetByName(sheetName);
var headers = sheet.getRange(1, 1, 1, sheet.getLastColumn()).getValues()[0];
function mapValues(values) {
var data = {};
for (var i=0, length=headers.length; i<length; i++) {
data[headers[i]] = values[i];
return data;
View handle_response.js
class ErrorResponseServiceNotAvailable extends Response {}
class ErrorResponseBackendFailed extends Response {}
class ErrorResponseValidation extends Response {}
class SuccessResponse extends Response {}
// the function
function handleResponse(response) {
if (response.status === 200) {
return new SuccessResponse(response);
You can’t perform that action at this time.