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
| #!/bin/bash | |
| # VARIABLES TO EDIT | |
| SOURCE_ROOT="/home/path/to/the/code/that/you/want/to/scan" # might be a good idea to remove all special characters from the name | |
| PLANG="csharp" # cpp, csharp, go, java, javascript, python, ruby | |
| PLATFORM="linux64" # linux64, osx64, win64 | |
| # VARIABLES NOT TO EDIT | |
| DATABASE_NAME="${SOURCE_ROOT##*/}_db" | |
| # cd TO SCRIPT DIR |
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
| // Add this line in your build.gradle dependencies {}: | |
| // implementation("com.android.volley:volley:1.2.1") | |
| fun sendGet(): String { | |
| val url = URL("https://website.com") | |
| with(url.openConnection() as HttpURLConnection) { | |
| requestMethod = "POST" | |
| println("\nSent 'GET' request to URL : $url; Response Code : $responseCode") |
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
| #!/bin/bash | |
| # in plugins.txt there is a list of plugin names (like contact-form-7), each in separate line | |
| while read p; do | |
| mkdir $p | |
| cd $p | |
| svn checkout https://plugins.svn.wordpress.org/$p/trunk | |
| cd .. | |
| done < plugins.txt |
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
| function x(){function t(t,r){return t+Math.floor((r-t)*Math.random())}function r(t){return("00"+Math.floor(t%100).toString(10)).slice(-2)}var n,e,o,u,a,c,i;return n=t(1800,2300),e=function(t){switch(t){case 18:return 80;case 19:return 0;case 20:return 20;case 21:return 40;case 22:return 60}}(Math.floor(n/100)),o=t(1,13),u=t(1,new Date(n,o+1,0).getDate()+1),a=o+e,c=("0000"+t(0,1e4).toString(10)).slice(-4),(i=r(n)+r(a)+r(u)+c)+function(t){var r,n=t.split("").map(function(t){return+t}),e=[1,3,7,9,1,3,7,9,1,3],o=0;for(r=0;r<e.length;r+=1)o+=e[r]*n[r];return o=(10-o%10)%10}(i)} | |
| Wywołanie: | |
| `x()` | |
| == | |
| Oryginał: https://github.com/marcin-chwedczuk/nip_regon_pesel/blob/master/index.html |
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
| // First make sure the wrapper app is loaded | |
| document.addEventListener("DOMContentLoaded", function() { | |
| // Then get its webviews | |
| let webviews = document.querySelectorAll(".TeamView webview"); | |
| // Fetch our CSS in parallel ahead of time | |
| const cssPath = 'https://gist.github.com/linoskoczek/6e9c3c2a9e5a511785b319335f7762e5/raw/d4fae48afcff526dabba67181e6fc6b6c660f8d2/slackDarkTheme.css'; | |
| let cssPromise = fetch(cssPath).then(response => response.text()); |
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
| /* copyright: https://userstyles.org/styles/154599/slack-tomorrow-dark-slate */ | |
| /* Scrollbar Chrome*/ | |
| *::-webkit-scrollbar | |
| { | |
| width: 10px !important; | |
| height: 10px !important; | |
| background: #1e1e1e !important; | |
| border: 1px solid #252525 !important; | |
| } |
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
| # install xrandr | |
| sudo pacman -S xorg-xrandr | |
| # check connected displays | |
| xrandr | |
| # rotate screen connected to VGA | |
| xrandr --output DP1 --rotate left | |
| xrandr --output DP1 --rotate right | |
| xrandr --output DP1 --rotate normal |
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
| DROP PROCEDURE IF EXISTS update_comments; | |
| DELIMITER $$ | |
| CREATE PROCEDURE update_comments() | |
| BEGIN | |
| DECLARE commentId bigint; | |
| DECLARE v_finished INTEGER DEFAULT 0; | |
| DECLARE messageCur CURSOR FOR SELECT comment_ID FROM wp_comments WHERE comment_approved = 0; | |
| DECLARE CONTINUE HANDLER FOR NOT FOUND SET v_finished = 1; |
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
| /* CLEANING UP PREVIOUS THINGS */ | |
| ALTER TABLE TBL DROP CONSTRAINT FK_WAITER; | |
| ALTER TABLE BOOKING DROP CONSTRAINT FK_TABLE; | |
| ALTER TABLE BOOKING DROP CONSTRAINT FK_CUSTOMER; | |
| ALTER TABLE ORDR DROP CONSTRAINT FK_DISH; | |
| ALTER TABLE WAITER DROP CONSTRAINT PK_WAITER; | |
| ALTER TABLE TBL DROP CONSTRAINT PK_TABLE; | |
| ALTER TABLE CUSTOMER DROP CONSTRAINT PK_CUSTOMER; | |
| ALTER TABLE BOOKING DROP CONSTRAINT PK_BOOKING; | |
| ALTER TABLE MENU DROP CONSTRAINT PK_MENU; |
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
| /* CLEANING UP PREVIOUS ONES */ | |
| ALTER TABLE TBL DROP CONSTRAINT FK_WAITER; | |
| ALTER TABLE BOOKING DROP CONSTRAINT FK_TABLE; | |
| ALTER TABLE BOOKING DROP CONSTRAINT FK_CUSTOMER; | |
| ALTER TABLE ORDR DROP CONSTRAINT FK_DISH; | |
| ALTER TABLE WAITER DROP CONSTRAINT PK_WAITER; | |
| ALTER TABLE TBL DROP CONSTRAINT PK_TABLE; | |
| ALTER TABLE CUSTOMER DROP CONSTRAINT PK_CUSTOMER; | |
| ALTER TABLE BOOKING DROP CONSTRAINT PK_BOOKING; | |
| ALTER TABLE MENU DROP CONSTRAINT PK_MENU; |