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
const trimMiddle = (text) => { | |
return text.trim().replace(/\s\s+/g,' '); | |
} | |
const trimAll = (text) => { | |
return text.replace(/\s+/g,''); | |
} | |
const roundTo = (n,kop) => { | |
let x=0; | |
if (typeof(n)==='number') | |
if (Number.isInteger(n)) |
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
const arrayToObject = (array) => { | |
return array.reduce(function(result, item) { | |
var key = Object.keys(item)[0]; | |
if(Array.isArray(item[key])) { | |
item[key] = arrayToObject(item[key]); | |
} | |
result[key] = item[key]; | |
return result; |
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
const calculate_ds = (lat1, lon1, lat2, lon2, timestamp1, timestamp2) => { | |
lat1 = lat1 * Math.PI / 180.0; | |
lon1 = lon1 * Math.PI / 180.0; | |
lat2 = lat2 * Math.PI / 180.0; | |
lon2 = lon2 * Math.PI / 180.0; | |
const r = 6378100; |
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
{ | |
"keys": ["tab"], | |
"command": "expand_abbreviation_by_tab", | |
// put comma-separated syntax selectors for which | |
// you want to expandEmmet abbreviations into "operand" key | |
// instead of SCOPE_SELECTOR. | |
// Examples: source.js, text.html - source | |
"context": [ | |
{ |
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
<snippet> | |
<content><![CDATA[console.log($1);$0]]></content> | |
<tabTrigger>clog</tabTrigger> | |
<scope>text.html,source.js,source.js.jsx</scope> | |
<description>console.log()</description> | |
</snippet> |
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
{ | |
"detect_indentation": false, | |
"fallback_encoding": "Cyrillic (Windows 1251)", | |
"font_size": 12, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"update_check": false, | |
"show_definitions": false |
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
## Sublime Text 3 Serial key build is 3176 | |
> * Added these lines into /etc/hosts | |
127.0.0.1 www.sublimetext.com | |
127.0.0.1 license.sublimehq.com | |
> * Used the license key | |
----- BEGIN LICENSE ----- |
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
plugins: [ | |
new webpack.ProvidePlugin({ | |
$: "jquery/dist/jquery.min.js", | |
jQuery: "jquery/dist/jquery.min.js", | |
"window.jQuery": "jquery/dist/jquery.min.js" | |
}) | |
]; |
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
git rm -r --cached node_modules | |
git commit -m 'Remove the now ignored directory node_modules' | |
git push origin master |
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
import java.io.*; | |
import java.util.*; | |
import java.text.*; | |
import java.math.*; | |
import java.util.regex.*; | |
public class Solution { | |
/** | |
* The add number method | |
*/ |
OlderNewer