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
| util.combineAlphaMask = function(image, mask) { | |
| // drawImage, getImageData, putImageDataは doubleを取るので整数化する | |
| // 仮キャンバス作成,描画 | |
| var canvas = document.createElement("canvas"); | |
| canvas.width = image.width; | |
| canvas.height = image.height; | |
| var ctx = canvas.getContext("2d"); | |
| ctx.drawImage(image, 0|0, 0|0); |
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
| util.createBitmapFromARGB = function(data, w, h) { | |
| // drawImage, getImageData, putImageDataは doubleを取るので整数化する | |
| // 仮キャンバス作成,描画 | |
| var canvas = document.createElement("canvas"); | |
| canvas.width = w; | |
| canvas.height = h; | |
| var ctx = canvas.getContext("2d"); | |
| var d = ctx.getImageData(0|0, 0|0, canvas.width, canvas.height); |
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
| // ==UserScript== | |
| // @name Tweetdeck Thumbnail from TwitterCards | |
| // @include https://tweetdeck.twitter.com/* | |
| // @version 1.0 | |
| // @grant unsafeWindow | |
| // @license MIT License | |
| // ==/UserScript== | |
| (function(){ | |
| var TD = unsafeWindow.TD; |
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
| ULONG GetZoneProcedure(USHORT Op) | |
| { | |
| ULONG Table = g_Ctx.Addr[VA_ZONETABLE]; | |
| __asm | |
| { | |
| mov esi, Table | |
| movsx eax, word ptr [Op] | |
| add eax, 0FFFFFF8Dh | |
| mov edi, [esi+eax*4] |
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
| bool? a = null; | |
| System.Action<bool> = (b) => { a = b; }; |
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 (_window) { | |
| chrome.runtime.onConnect.addListener(function (port) { | |
| if (port.name == "registerFilters") { | |
| chrome.webRequest.onBeforeRequest.addListener(function (details) { | |
| if (port && details.requestBody) { | |
| port.postMessage({ url: details.url, data: details.requestBody.formData }); | |
| } | |
| }, { urls: [ "http://*/kcsapi/api_req_hensei/change" ] }, [ "blocking", "requestBody" ]); | |
| port.onDisconnect.addListener(function () { | |
| // TODO: onBeforeRequest.removeListenerやっておいたほうが無駄に listener残らなくていいかも |
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() { | |
| chrome.runtime.onInstalled.addListener(function () { | |
| var rule3 = { | |
| priority: 110, | |
| conditions: [ | |
| new chrome.declarativeWebRequest.RequestMatcher({ | |
| url: { | |
| hostEquals: 'pbs.twimg.com', | |
| pathContains: '/media/', | |
| queryContains: 'name=' |
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
| #include <SDKDDKVer.h> | |
| #include <Windows.h> | |
| #include <wincodec.h> | |
| #include <comdef.h> | |
| #include <wrl.h> | |
| HRESULT test() | |
| { | |
| HRESULT hr; |
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
| template <typename T> | |
| std::deque<T> expand_ranges(const std::string& src, size_t limit) | |
| { | |
| std::deque<T> r; | |
| // 現状の parseStringToでは結局分割した std::stringが必要なので先に splitでバラしておく | |
| auto a = split(src, ','); | |
| for (auto it = a.cbegin(); ((it != a.cend()) && (r.size() <= limit)); ++it) { | |
| T v1; | |
| if (parseStringTo<T>(v1, *it) == it->size()) { |
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
| *::before { | |
| border-color: transparent; | |
| } | |
| .pop-usual::before, [class^=cnt-]::before, [class^=prt-]::before, [class^=lis-]::before, [id^=prt-]::before { | |
| border-style: solid; | |
| border-width: 0; | |
| } |
OlderNewer