This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copied from https://news.ycombinator.com/item?id=23590750 | |
| const $t = document.createTextNode.bind(document); | |
| const $e = (t = 'div', p = {},c = []) => { | |
| let el = document.createElement(t); | |
| Object.assign(el,p); | |
| el.append(...c); | |
| return el; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| convert image.jpg -resize '128^>' -extent 128x128 newimage.jpg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| create table certificates ( | |
| user_row_id int not null unique, | |
| first_name varchar(40) not null, | |
| last_name varchar(50) not null, | |
| email varchar(50) not null, | |
| birth_date date not null, | |
| test_datetime datetime not null, | |
| CONSTRAINT `fk_user_row_id` -- create fk constraint | |
| foreign key (user_row_id) references users (id) -- define constraint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| setInterval(function() { | |
| // Remove retweets | |
| for (let e of document.querySelectorAll('[data-testid="unretweet"')) { | |
| e.click(); | |
| // Click undo retweet popup | |
| for (let u of document.querySelectorAll('div[data-testid="unretweetConfirm"')) { | |
| u.click(); | |
| } | |
| // Remove tweet div | |
| e.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.removeChild(e); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example | |
| import android.graphics.Bitmap; | |
| import android.graphics.BitmapShader; | |
| import android.graphics.Canvas; | |
| import android.graphics.Matrix; | |
| import android.graphics.Paint; | |
| import com.squareup.picasso.Transformation; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //A Kotlin object (singleton) that handles the copying with mulitple different arguments | |
| object CopyBytes { | |
| @Throws(IOException::class) | |
| fun copy(input: InputStream, output: OutputStream) { | |
| //Creating byte array | |
| val buffer = ByteArray(1024) | |
| var length = input.read(buffer) | |
| //Transferring data |