This file contains 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
import java.util.Base64.Encoder; | |
String base64Encode = Base64.getEncoder().encodeToString(signHashParam.getBytes(Charset.forName("UTF-8"))); |
This file contains 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
// https://stackoverflow.com/questions/4250364/how-to-trim-a-file-extension-from-a-string-in-javascript/34301737 | |
// splite string into array by dot | |
// slice from the beginning to the second last to rid of the extension | |
// join the array and remain the dot within the name | |
filename.split('.').slice(0, -1).join('.') | |
// get file extension | |
filename.split('.').slice(-1).join() |
This file contains 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
git reflog | |
git reset --hard HEAD@{<number>} |
This file contains 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
/* | |
list item keep indent when multiple line | |
*/ | |
.cssClass li { | |
list-style-type: disc; | |
list-style-position: inside; | |
text-indent: -1em; | |
padding-left: 1em; | |
} |
This file contains 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
var mediajPlayer = { | |
isTouch: isMobile.any() && 'ontouchstart' in window, | |
eventX: null, | |
timeout: null, | |
slideStart: function(evt) { | |
evt.stopPropagation(); | |
evt.preventDefault(); | |
var playlistRight = $(window).width() - ( | |
$('div#jp-playlist-container').offset().left + |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title></title> | |
<style> | |
circle { | |
stroke-dashoffset: 100px; | |
/*animation: sector 1s linear;*/ | |
} |
This file contains 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
const router = new Router({ | |
routes: [ | |
// ... | |
], | |
// set custom query resolver | |
parseQuery(query) { | |
return qs.parse(query); | |
}, | |
stringifyQuery(query) { | |
var result = qs.stringify(query); |
This file contains 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
INSERT INTO tabel_name (table_col_a, table_col_b, table_col_c) VALUES (1,2,3),(4,5,6),(7,8,9); |
This file contains 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
/* light mode */ | |
@media (prefers-color-scheme: light) { } | |
/* dark mode */ | |
@media (prefers-color-scheme: dark) { } | |
/* Option 1 */ | |
@media (prefers-color-scheme: dark) { | |
html { | |
filter: invert(1); | |
} |
This file contains 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
# Output a file of query result with formatted table from a sql file | |
mysql -u$user -p$password -h$ip $table_name --table < query.sql > output.log |