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
| # .github/workflows/example.yml | |
| # https://stackoverflow.com/questions/23793062/can-forks-be-synced-automatically-in-github | |
| name: Merge upstream branches | |
| on: | |
| schedule: | |
| # actually, ~5 minutes is the highest | |
| # effective frequency you will get | |
| - cron: '0 * * * *' | |
| jobs: |
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
| @prefix ex: <http://example.com/ex#> . | |
| @prefix dpv: <http://example.com/dpv#> . | |
| @prefix owl: <http://www.w3.org/2002/07/owl#> . | |
| @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | |
| @prefix xml: <http://www.w3.org/XML/1998/namespace> . | |
| @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | |
| @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | |
| @prefix skos: <http://www.w3.org/2004/02/skos/core#> . | |
| @base <http://example.com/dpv-skos#> . |
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
| # This is an earlier iteration of an consent ontology | |
| # It is preserved for discussion purpose regarding linking | |
| # purpose with other aspects i.e. processing, personal data | |
| # For use, consider GConsent | |
| # A consent ontology modelled for GDPR compliance | |
| # _author:_ Harshvardhan Pandit | |
| # _email:_ me@harshp.com | |
| # _URI:_ https://w3id.org/GConsent | |
| # _documentation:_ https://w3id.org/GConsent/docs |
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
| /* remove heart on main view and replace with pin */ | |
| div.css-1dbjc4n.r-18u37iz.r-1wtj0ep.r-1s2bzr4.r-1mdbhws > div:nth-child(3) > div:first-child > div:first-child > div:nth-child(1) { | |
| visibility: hidden; | |
| } | |
| div.css-1dbjc4n.r-18u37iz.r-1wtj0ep.r-1s2bzr4.r-1mdbhws > div:nth-child(3) > div:first-child > div:after { | |
| content: "📌"; | |
| color: transparent; | |
| text-shadow: 0 0 0 #8899a6; | |
| } |
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
| <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> | |
| <script> | |
| window.addEventListener('load', function() { | |
| var url = window.location.href; | |
| $('a').each(function() { | |
| if (this.href.startsWith(url + '#')) { | |
| var ele_id = this.href.substring(url.length + 1); | |
| // console.debug($(ele_id).length, ele_id); | |
| var ele = document.getElementById(ele_id); | |
| if (ele === null) console.log(ele_id, ele); |
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
| #!/usr/bin/env bash | |
| # author Harshvardhan Pandit | |
| # how this works: | |
| # using snmpwalk, the jobstring status is retrieved for the printer using the | |
| # query (found using Lexmark MIB) | |
| # by default, NOJOBRESPONSE is returned. | |
| # If this is not the response, then that means that something is being printed. | |
| # The jobstring contains the IP address of the job (who send that job). |
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
| /** | |
| __ __ _ _______ ____ _ _ _____ _ _ _ ____ | |
| \ \ / /\ | | |__ __/ __ \| \ | | / ____| | | | | | _ \ | |
| \ \ /\ / / \ | | | | | | | | \| | | | | | | | | | |_) | | |
| \ \/ \/ / /\ \ | | | | | | | | . ` | | | | | | | | | _ < | |
| \ /\ / ____ \| |____| | | |__| | |\ | | |____| |___| |__| | |_) | | |
| \/ \/_/ \_\______|_| \____/|_| \_| \_____|______\____/|____/ | |
| ROBOT CAR CODE |
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
| $> touch ~/.ssh/config | |
| //Contents: | |
| Host <convenient_name> | |
| Hostname <ip_address_or_url> | |
| IdentityFile <~/.ssh/pem_key_file> | |
| User <name_of_user> | |
| Host ... [repeat for each ssh config] |
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
| // login as root | |
| mysql -uroot -p | |
| // select mysql internal database | |
| select mysql; | |
| // delete relevant user | |
| drop user 'username'@'host'; | |
| // create user again |
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
| # using struct | |
| # the 'H' stands for unsigned 2-byte 16bit number | |
| # use 'h' for signed 2-byte 16bit number | |
| # further reference available in python.struct docs | |
| import struct | |
| m16 = lambda x: struct.unpack('H', struct.pack('H', x))[0] | |
| # using bitwise AND | |
| # just AND it with 0XFFFF (max 16-bit value) |
NewerOlder