Skip to content

Instantly share code, notes, and snippets.

🎸
search for coding berlin

Stefan Adolf elmariachi111

🎸
search for coding berlin
Block or report user

Report or block elmariachi111

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
@elmariachi111
elmariachi111 / reactday.json
Created Nov 2, 2019
ReactDay Schema.org JSON-LD
View reactday.json
{
"@context": "http://schema.org",
"@type": "BusinessEvent",
"startDate": "2019-12-06T08:30:00+01:00",
"endDate": "2019-12-06T22:00:00+01:00",
"name": "React Day Berlin 2019",
"url": "https://www.eventbrite.com/e/react-day-berlin-2019-tickets-61442110005",
"image": "https://img.evbuc.com/https%3A%2F%2Fcdn.evbuc.com%2Fimages%2F61772770%2F80020269147%2F1%2Foriginal.jpg?w=1000\u0026auto=compress\u0026rect=0%2C64%2C1920%2C960\u0026s=ddd233f8f2f07ec16e2b61d55bf9f0ba",
"eventStatus": "EventScheduled",
"offers": [
View turbiners_feature_engineering.py
# -*- coding: utf-8 -*-
"""Cleaning_Feature_engineering.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1cyB8vww3lA0GhABA0mGJluHjfA0VnY5u
"""
from google.colab import drive
@elmariachi111
elmariachi111 / truncate.js
Created Jun 19, 2019
Javascript: truncate a text along punctuation marks
View truncate.js
/*
assume you want to truncate a longer text to a certain amount of characters but you don't want to stop at
word boundaries. Instead lets cut the text at sentence ending punctuation marks like ! ? .
*/
function pos(str, char) {
let pos = 0
const ret = []
while ( (pos = str.indexOf(char, pos + 1)) != -1) {
ret.push(pos)
View README.md

how to extend vue cli with webpack loader

have fun using this

@elmariachi111
elmariachi111 / SendMailCommand.php
Created Oct 19, 2018
PHP / Symfony: create zip file mail attachments in memory
View SendMailCommand.php
<?php
namespace App\Command;
use Badcow\LoremIpsum\Generator;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use ZipStream\ZipStream;
@elmariachi111
elmariachi111 / encryption.js
Last active Mar 6, 2018
blockstagram / key generation & manual encryption
View encryption.js
import SimpleCryptoJS from 'simple-crypto-js'
const blockstack = require( 'blockstack' );
const { getPublicKeyFromPrivate } = require('blockstack');
const { encryptECIES, decryptECIES } = require('blockstack/lib/encryption')
...
class App extends React.Component {
componentDidMount() {
@elmariachi111
elmariachi111 / SigninButton.jsx
Created Mar 5, 2018
blockstagram / SigninButton.jsx
View SigninButton.jsx
import React from 'react';
import * as blockstack from 'blockstack'
export default class SigninButton extends React.Component {
onClick (evt) {
evt.preventDefault();
if (this.props.userData) {
blockstack.signUserOut('/');
} else {
@elmariachi111
elmariachi111 / index.jsx
Last active Mar 6, 2018
blockstagram / index.jsx
View index.jsx
const blockstack = require( 'blockstack' );
const { getPublicKeyFromPrivate } = require('blockstack');
const { encryptECIES, decryptECIES } = require('blockstack/lib/encryption')
...
class App extends React.Component {
constructor() {
super()
this.state = {
View gist:78196228d2e56debe915994af725a4ab
Verifying my Blockstack ID is secured with the address 1N9A6gny5PTDiZ1JYZbWbgAskSWTyMuvS7 https://explorer.blockstack.org/address/1N9A6gny5PTDiZ1JYZbWbgAskSWTyMuvS7
View gist:63ab8c887b3a00900c2e3182678a6420
Verifying my Blockstack ID is secured with the address 1N9A6gny5PTDiZ1JYZbWbgAskSWTyMuvS7 https://explorer.blockstack.org/address/1N9A6gny5PTDiZ1JYZbWbgAskSWTyMuvS7
You can’t perform that action at this time.