Skip to content

Instantly share code, notes, and snippets.

View exceedsystem's full-sized avatar

Y.Sakamoto exceedsystem

View GitHub Profile
@exceedsystem
exceedsystem / EMA_S_M_L.pine
Last active May 14, 2021 15:07
Use EMA (Short/Middle/Long) indicator with specific fixed resolution in TradingView
// License:MIT
study("EMA S/M/L", overlay = true)
res = input(title = "Resolution", type = input.resolution, defval = "D")
si = input(title = "S", type = input.integer, defval = 5)
mi = input(title = "M", type = input.integer, defval = 20)
li = input(title = "L", type = input.integer, defval = 200)
es_ema = security(syminfo.tickerid, "D", ema(close, si))
@exceedsystem
exceedsystem / block-bad-bots.php
Last active June 24, 2021 13:05
Block bad bots plugin for wordpress
<?php
/*
Plugin Name: Block Bad Bots
Description: Block bad bots
Author: EXCEEDSYSTEM
Author URI: https://www.exceedsystem.net/
License: MIT
License URI: https://opensource.org/licenses/MIT
*/
@exceedsystem
exceedsystem / Program.cs
Last active October 18, 2021 19:55
Use surfshark vpn from linux other than ubuntu and debian
// https://www.exceedsystem.net/2021/10/02/how-to-use-surfshark-vpn-from-linux-other-than-ubuntu-and-debian/
// License:MIT
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
namespace SurfsharkConnector
{
@exceedsystem
exceedsystem / index.html
Created October 31, 2021 04:26
Electron ContextMenu Issue 1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Electron Context Menu Test</title>
</head>
<body>
<script>
@exceedsystem
exceedsystem / index.html
Created October 31, 2021 22:13
An Example of how to show context-menu in Electron
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Electron Context Menu Sample</title>
</head>
<body>
<script>
// License:MIT
local buttonNum = 4 -- Left small button is 3, Right small button is 4
local scrolling = false
local scrollSteps = -2 -- When negative, it scrolls in reverse.
hooksMouseUp = hs.eventtap.new({hs.eventtap.event.types.otherMouseUp}, function(e)
if (e:getProperty(hs.eventtap.event.properties.mouseEventButtonNumber) == buttonNum and scrolling) then
scrolling = false
return true
end
@exceedsystem
exceedsystem / EmoCheckUpdater.cs
Created May 25, 2022 14:48
EmoCheck automatic update tool
// EXCEEDSYSTEM EmoCheckUpdater
// https://www.exceedsystem.net/2022/05/26/how-to-update-emocheck-automatically
// License: MIT
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Json;
using System.Reflection;
@exceedsystem
exceedsystem / AWSCognitoTestApp.csproj
Last active June 4, 2022 03:36
AWS Cognito SignUp/Confirm/SignIn example .NET 6(C#)
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
@exceedsystem
exceedsystem / ts2jsonschema.js
Last active July 3, 2022 23:01
VS Code Macros extension macro that generates json schema from typescript
// [VSCode Macros] extension
// https://marketplace.visualstudio.com/items?itemName=EXCEEDSYSTEM.vscode-macros
// License:MIT
const vscode = require('vscode');
const tsjsg = require('ts-json-schema-generator');
const tmpp = require('tmp-promise');
module.exports.macroCommands = {
TS2JsonSchema: {
no: 1,
@exceedsystem
exceedsystem / list-files.js
Created September 28, 2021 12:19
An example of 'Show file list' macro for VSCodeMacros extension
// [VSCode Macros] extension
// https://marketplace.visualstudio.com/items?itemName=EXCEEDSYSTEM.vscode-macros
// License:MIT
const vscode = require('vscode');
const fs = require('fs');
const path = require('path');
/**
* Macro configuration settings
* { [name: string]: { ... Name of the macro