Skip to content

Instantly share code, notes, and snippets.

View IrealiTY's full-sized avatar
🐻

Aleks IrealiTY

🐻
View GitHub Profile
@IrealiTY
IrealiTY / jqMT
Created November 20, 2014 14:24
jQMobile-Touch
/*! jQuery Mobile v1.3.2 | Copyright 2010, 2013 jQuery Foundation, Inc. | jquery.org/license */
(function(e,t,n){typeof define=="function"&&define.amd?define(["jquery"],function(r){return n(r,e,t),r.mobile}):n(e.jQuery,e,t)})(this,document,function(e,t,n,r){(function(e,t,n,r){function x(e){while(e&&typeof e.originalEvent!="undefined")e=e.originalEvent;return e}function T(t,n){var i=t.type,s,o,a,l,c,h,p,d,v;t=e.Event(t),t.type=n,s=t.originalEvent,o=e.event.props,i.search(/^(mouse|click)/)>-1&&(o=f);if(s)for(p=o.length,l;p;)l=o[--p],t[l]=s[l];i.search(/mouse(down|up)|click/)>-1&&!t.which&&(t.which=1);if(i.search(/^touch/)!==-1){a=x(s),i=a.touches,c=a.changedTouches,h=i&&i.length?i[0]:c&&c.length?c[0]:r;if(h)for(d=0,v=u.length;d<v;d++)l=u[d],t[l]=h[l]}return t}function N(t){var n={},r,s;while(t){r=e.data(t,i);for(s in r)r[s]&&(n[s]=n.hasVirtualBinding=!0);t=t.parentNode}return n}function C(t,n){var r;while(t){r=e.data(t,i);if(r&&(!n||r[n]))return t;t=t.parentNode}return null}function k(){g=!1}function L(){g=!0}f
@IrealiTY
IrealiTY / urlconv
Last active August 29, 2015 14:10
URL converter
javascript:(function(){var videoEmbed = {invoke: function(){$('body').html(function(i, html) {return videoEmbed.convertMedia(html);});},convertMedia: function(html){var pattern1 = /(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;var pattern2 = /(?:http?s?:\/\/)?(?:www\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=)?(.+)/g;var pattern3 = /([-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?(?:jpg|jpeg|gif|png))/gi;if(pattern1.test(html)){ var replacement = '<iframe width="420" height="345" src="//player.vimeo.com/video/$1" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'; var html = html.replace(pattern1, replacement);if(pattern2.test(html)){var replacement = '<iframe width="420" height="345" src="http://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>';var html = html.replace(pattern2, replacement);}if(pattern3.test(html)){var replacement = '<a href="$1" target="_blank"><img class="sml" src="$1" /></a><br />';var html = html.rep
@IrealiTY
IrealiTY / WidgetHTML.html
Last active April 22, 2019 01:29
Guildwork Recruite
<div class="recruite">
<div class="class pld h">
<h3>Paladin</h3><div class="indicator"></div>
</div>
<div class="class drk h">
<h3>Dark Knight</h3><div class="indicator"></div>
</div>
<div class="class war m">
@IrealiTY
IrealiTY / panel.css
Last active May 26, 2016 11:29
Progress Widget Guildwork
.newprogress h4 {margin:0; padding:0;}
.newprogress .turn {
background: #0e0e0e url(https://cdn.guildwork.net/files/529f138ec16e4d36f91342f4/54d8b986002aa80e5e0a7605.png) no-repeat right top;
height:48px;
padding:3px 4px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
margin-bottom:6px;
opacity:0.6;
@IrealiTY
IrealiTY / InertialBounce.jsx
Created July 16, 2024 12:42 — forked from animoplex/InertialBounce.jsx
Inertial Bounce - After Effects Expression by Animoplex
// Inertial Bounce - Created by Animoplex: www.animoplex.com
// Original Version: http://www.graymachine.com/top-5-effects-expressions/
// Modified expression for a smoother bounce effect and easier editing. Use this on any property with two keyframes to get a nice bounce effect that is based on velocity of the value change. Perfect for a scale from 0 to 100 or a speedy rotation that needs some extra life. Adjust amp, freq and decay values to tweak the effect. Amp is intensity, freq is bounces per second, and decay is the speed of decay, slow to fast.
// Full Tutorial: https://www.youtube.com/watch?v=653lxeVIyoo
amp = 5.0; freq = 2.0; decay = 4.0;
n = 0;
if (numKeys > 0) {
n = nearestKey(time).index;
@IrealiTY
IrealiTY / audio_to_ac3.ps1
Last active July 21, 2024 15:57
Converts audio FLAC to ac3 via Powershell and FFMPEG
Get-ChildItem -Filter *.mkv | ForEach-Object {
$outputFile = $_.BaseName + "_ac3.mkv"
# Get information about audio streams
$audioStreams = ffprobe -v error -select_streams a -show_entries stream=index,codec_name -of csv=p=0 $_.FullName | ForEach-Object {
$stream = $_ -split ','
[PSCustomObject]@{
Index = [int]$stream[0]
Codec = $stream[1]
}