Skip to content

Instantly share code, notes, and snippets.

View iSimar's full-sized avatar
:octocat:

Simar iSimar

:octocat:
View GitHub Profile

Prerequisites

  • Docker
  • Docker Compose

If you don't have these, run

brew install docker docker-compose
@iSimar
iSimar / custom.js
Created June 1, 2022 17:37
copy title and url pr button
if (window.location.href.includes('pull/')) {
const copyTitleUrlHTML = `
<button id="copy-title-url-btn" class="btn-sm btn" data-view-component="true" type="button"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy">
<path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path>
</svg> Copy title &amp; url
</button>`;
document.getElementsByClassName('pagehead-actions');
const li = document.createElement("li");
li.innerHTML = copyTitleUrlHTML;
<html>
<head>
<script type="text/javascript"> // <![CDATA[
setTimeout(function() {
if ((navigator.userAgent.indexOf('iPhone') != -1) || (navigator.userAgent.indexOf('iPod') != -1)) {
document.location = "https://itunes.apple.com/ca/app/mysimran-info/id1358571331?mt=8";
} // ]]>
else if ((navigator.userAgent.indexOf('iPad') != -1)) {
document.location = "https://itunes.apple.com/ca/app/mysimran-info/id1358571331?mt=8";
} // ]]>
@iSimar
iSimar / d
Created February 4, 2018 04:51
ds
tester hi hi hi
@iSimar
iSimar / DEMO
Created February 4, 2018 04:48
random text
hi
sadsajnsdjsadnjdsnsdajnsd
sadskmadksm
import os, os.path
import datetime
import csv
cur_dir=os.path.dirname(os.path.realpath(__file__))
timestamp=datetime.datetime.now().strftime("%Y-%m-%d-%H-%M-%S")
def sizeof_fmt(num, suffix='B'):
for unit in ['','K','M','G','T']:
int lightState=LOW;
void setup(){
Serial.begin(9600);
// pinMode(6, INPUT);
pinMode(3, INPUT_PULLUP);
pinMode(12, OUTPUT);
Serial.println("Starting");
}
void loop(){