Skip to content

Instantly share code, notes, and snippets.

View RedDragon55's full-sized avatar

RedDragon RedDragon55

View GitHub Profile
mongodump --archive=test.20150715.gz --gzip --db test
mongorestore --gzip --archive=test.20150715.gz --db test
{
"Vue Component": {
"scope": "javascript,typescript,vue",
"prefix": "component",
"body": [
"<style lang=\"scss\" scoped>",
"\t.$1 {",
"\t}",
"</style>\n",
"<template>",
{
"Vue Store Module": {
"scope": "javascript,typescript,vue",
"prefix": "store_module",
"body": [
"\"use strict\";",
"",
"const state = {};",
"const actions = {};",
"const mutations = {};",
{
"Vue Router Path": {
"scope": "javascript,typescript,vue",
"prefix": "router_path_component",
"body": [
"{",
"\tpath: '/$1',",
"\tcomponent: $2",
"},"
],
function ToInteger(x) {
x = Number(x);
return x < 0 ? Math.ceil(x) : Math.floor(x);
}
function modulo(a, b) {
return a - Math.floor(a/b)*b;
}
function ToUint8(x) {
@RedDragon55
RedDragon55 / curl.sh
Created May 22, 2019 13:29 — forked from exAspArk/curl.sh
Test CORS with cURL
curl -I -X OPTIONS \
-H "Origin: http://EXAMPLE.COM" \
-H 'Access-Control-Request-Method: GET' \
http://EXAMPLE.COM/SOMETHING 2>&1 | grep 'Access-Control-Allow-Origin'