Instantly share code, notes, and snippets.
Roman Liutikov roman01la
🇺🇦
Software Engineer
- Kyiv, Ukraine
- https://romanliutikov.com/
- @roman01la
- @romanliutikov.com
roman01la
/ extract_telegram_macos.ipynb
Created
May 31, 2024 15:20
— forked from stek29/extract_telegram_macos.ipynb
Extract Telegram messages from db_sqlite PostBox – made for Telegram for macOS, but should work with Telegram for iOS
roman01la
/ ListContainer.jsx
Last active
April 13, 2017 13:45
— forked from mpj/templating_problems.MD
Templating critique
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
let ListContainer = ({ items }) =>
<div className="list-container">
{items.length ? <ul>
{items.map(item =>
<li key={item.id}>{item.name}</li>}
</ul> : <p>No items found</p>}
</div>
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 callWithEventValue(fn) {
return comp(fn, lenseTo('target', 'value'));
}
class SomeComponent extends React.Component {
render() {
return (
<div>
//...
roman01la
/ fwajax3.js
Created
February 5, 2014 16:07
— forked from fillano/fwajax3.js
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 FwAjax3(host, cb) {
var req = function() {
try{ return new XMLHttpRequest();} catch(e){}
try{ return new ActiveXObject("Msxml2.XMLHTTP.6.0") }catch(e){}
try{ return new ActiveXObject("Msxml2.XMLHTTP.3.0") }catch(e){}
try{ return new ActiveXObject("Msxml2.XMLHTTP") }catch(e){}
try{ return new ActiveXObject("Microsoft.XMLHTTP") }catch(e){}
return null;
}(),
boundary = function () {
roman01la
/ jshipster_and_and.js
Created
November 26, 2013 08:46
— forked from berzniz/jshipster_and_and.js
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
// Boring
if (isThisAwesome) {
alert('yes'); // it's not
}
// Awesome
isThisAwesome && alert('yes');
// Also cool for guarding your code
var aCoolFunction = undefined;
roman01la
/ gist:7647349
Created
November 25, 2013 19:34
— forked from paulosborne/gist:7640679
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 message = "hello, how are you Tal?";
if (~message.indexOf('Tal')) {
console.log('found matching text');
}
roman01la
/ resize.js
Created
July 31, 2012 16:16
— forked from robtarr/resize.js
Google Analytics Resize Tracking
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() {
var resizeTimer;
// Assuming we have jQuery present
$( window ).on( "resize", function() {
// Use resizeTimer to throttle the resize handler
clearTimeout( resizeTimer );
resizeTimer = setTimeout(function() {
roman01la
/ animLoopX.js
Created
July 28, 2012 14:41
— forked from louisremi/animLoopX.js
Animation loop with requestAnimationFrame
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
// Cross browser, backward compatible solution
(function( window, Date ) {
// feature testing
var raf = window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.msRequestAnimationFrame ||
window.oRequestAnimationFrame;
window.animLoop = function( render, element ) {
var running, lastFrame = +new Date;