View lexer.py
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
# -*- coding: utf-8 -*- | |
""" | |
pygments.lexers.jsx | |
~~~~~~~~~~~~~~~~~~~~ | |
Lexers for JSX formats. | |
Based on https://github.com/fcurella/jsx-lexer | |
""" | |
import re |
View gulpfile.js
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 gulp = require('gulp'); | |
var clean = require('gulp-clean'); | |
var shell = require('gulp-shell'); | |
// 0. Clean all ZXPs found everywhere | |
gulp.task('clean-all', function () { | |
return gulp.src('./**/*.zxp', { read: false }) | |
.pipe(clean()); | |
}); |
View PartialSerialNumberVerification.js
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
/** | |
* Generates a Key Byte | |
* @param {32bit integer} seed e.g. 0xA2791717 | |
* @param {8bit integer} a | |
* @param {8bit integer} b | |
* @param {8bit integer} c | |
* @return {8bit hex string} | |
*/ | |
function PKV_GetKeyByte(seed, a, b, c) { | |
var result; |
View index.html
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 charset="utf-8"> | |
<link id="hostStyle" rel="stylesheet" href="css/theme.css"/> | |
<link id="theme" rel="stylesheet" href="css/light.css"/> | |
<title></title> | |
</head> | |
<body> | |
View main.js
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
/*jslint vars: true, plusplus: true, devel: true, nomen: true, regexp: true, indent: 4, maxerr: 50 */ | |
/*global $, window, location, CSInterface, SystemPath, themeManager*/ | |
line | |
(function () { | |
'use strict'; | |
var csInterface = new CSInterface(); | |
var extensionId = csInterface.getExtensionID(); | |
function PersistentOn() { |
View javascriptobfuscator.js
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 http = require('http'), | |
fs = require('fs'), | |
Readable = require('stream').Readable, | |
through = require('through2'), | |
gutil = require('gulp-util'), | |
Vinyl = require('vinyl'); | |
module.exports = function() { | |
var transform = function(file, encoding, callback) { |
View DropDown.vue
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
<template> | |
<div class="spectrum-Dropdown" :class="{ 'is-open': showMenu }" style="width: 240px;"> | |
<button class="spectrum-FieldButton spectrum-Dropdown-trigger is-selected" aria-haspopup="true" @click="toggleMenu"> | |
<span class="spectrum-Dropdown-label">{{ displayedItem }}</span> | |
<svg class="spectrum-Icon spectrum-UIIcon-ChevronDownMedium spectrum-Dropdown-icon" focusable="false" aria-hidden="true"> | |
<use xlink:href="#spectrum-css-icon-ChevronDownMedium" /> | |
</svg> | |
</button> | |
<div class="spectrum-Popover spectrum-Popover--bottom spectrum-Dropdown-popover" :class="{ 'is-open': showMenu }" |
View find-corrupted-files.sh
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
folderToCheck='/Volumes/16TB/whatever/path' | |
outputFile=~/Desktop/FileIntegrity.log | |
counter=1 | |
Red="\033[0;31m" # Red | |
Green="\033[0;32m" # Green | |
Color_Off="\033[0m" # Text Reset | |
cd "${folderToCheck}" | |
# Find all files and get count |
View panels201_4.js
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
// JS file (panel) | |
// ... | |
csInterface.evalScript('getDocumentInfo()', function(res) { | |
var resObj = JSON.parse(res); | |
// you have now access to the same docInfo object | |
}); | |
// JSX file (Photoshop) | |
function getDocumentInfo() { | |
//... I just make up data here... |
View panels201_3.js
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
// JS file (panel) | |
// ... | |
csInterface.evalScript('addSharpeningForWeb(' + paramString + ')', function(res) { | |
// "res" is the response that comes from Photoshop | |
}); | |
// JSX file (Photoshop) | |
function addSharpeningForWeb(paramObj) { | |
// ... lots of code here | |
return true; |
NewerOlder