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
| using System; | |
| using System.Collections.Generic; | |
| using System.Drawing; | |
| using System.Globalization; | |
| using System.Linq; | |
| using System.Windows.Forms; | |
| namespace ControlManager | |
| { | |
| internal class ControlMoverOrResizer |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace amitkhare | |
| { | |
| public class Row | |
| { |
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
| var maxValue = 500; | |
| var maxAngle = 180; | |
| var minAngle = 0; | |
| var rotation = (maxAngle/maxValue * a); | |
| rotation = (rotation >= maxAngle) ? maxAngle : rotation; | |
| result = (rotation <= minAngle) ? minAngle : rotation; |
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
| #target illustrator | |
| var docRef = app.activeDocument; | |
| with (docRef) { | |
| //int j = items.pathItems[0]; | |
| // layers[0].name = "Layer 1"; | |
| alert(app.activeDocument.pathItems[0].name + ""); | |
| for(var i =0; i < app.activeDocument.pathItems.length; i++) { | |
| app.activeDocument.pathItems[i].name = pad((i+1), 3); |
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
| index = timeToFrames(t = time + thisComp.displayStartTime, fps = 1.0 / thisComp.frameDuration, isDuration = false); | |
| lines = value.split("\r"); | |
| lines[index]; |
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
| /* | |
| VARIABLES TO CREATE | |
| WInteger | |
| imgIndex : 0 | |
| imgTotal : 0 | |
| WString | |
| imgPath : "" | |
| selectedFile : "" | |
| WBoolean | |
| isComplete : 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
| Requirements | |
| Putty prefered if you are in Windows. | |
| JuiceSSH if you choose to do all this from android phone | |
| https://play.google.com/store/apps/details?id=com.sonelli.juicessh | |
| A digitalocean account, if you dont have one, create one with this link | |
| https://bit.ly/do-credit | |
| You will get $10 credit in you digitalocean account once you spend $25 with them. | |
| create digitalocean account, verify it. | |
| create droplet. |
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
| pm2 kill | |
| pm2 start /var/www/<PATH>/server.js -i max --name "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
| var express = require('express'); | |
| var app = express(); | |
| var http = require('http').Server(app); | |
| var io = require('socket.io')(http); | |
| app.get('/', function(req, res){ | |
| res.sendFile(__dirname + '/public/default.html'); | |
| }) | |
| app.use('/', express.static('public')); |
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
| // Run from the dev tools console of any Youtube video | |
| // Accurate as of June 23, 2017. | |
| // ES6 version | |
| const videoUrls = ytplayer.config.args.adaptive_fmts | |
| .split(',') | |
| .map(item => item | |
| .split('&') | |
| .reduce((prev, curr) => (curr = curr.split('='), | |
| Object.assign(prev, {[curr[0]]: decodeURIComponent(curr[1])}) |