Skip to content

Instantly share code, notes, and snippets.

View ufukomer's full-sized avatar
🌍
On Earth

ufukomer

🌍
On Earth
View GitHub Profile
@neilndev
neilndev / create-vod-hls.sh
Created October 31, 2019 12:45
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)
#!/usr/bin/env bash
set -e
# Usage create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]
[[ ! "${1}" ]] && echo "Usage: create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]" && exit 1
# comment/add lines here to control which renditions would be created
renditions=(
# resolution bitrate audio-rate
@avivace
avivace / telegramRestore.md
Last active January 24, 2026 07:06
Restore deleted Telegram messages from groups

Restore deleted Telegram messages, medias and files from groups

There's not telegram API method for this, we need to call MTProto methods to retrieve messages from the "Recent Actions" (Admin Log) since deleted messages (and medias) gets moved there for 48 hours before the permanent deletion.

from telethon import TelegramClient, events, sync
from telethon.tl.types import InputChannel, PeerChannel
name = HardwareToken
library = /Library/Frameworks/eToken.framework/Versions/A/libeToken.dylib
slotListIndex = 0
@mrbar42
mrbar42 / README.md
Last active February 25, 2026 23:47
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8
@fdidron
fdidron / App.js
Last active September 26, 2025 04:26
React Router v4 Auth
//Usage
import React from 'react';
import { BrowserRouter as Router } from 'react-router-dom';
import Route from './AuthRoute';
import Login from './Login';
import Private from './Private';
export default () =>
<Router>
@acdlite
acdlite / app.js
Last active April 20, 2026 19:56
Quick and dirty code splitting with React Router v4
// getComponent is a function that returns a promise for a component
// It will not be called until the first mount
function asyncComponent(getComponent) {
return class AsyncComponent extends React.Component {
static Component = null;
state = { Component: AsyncComponent.Component };
componentWillMount() {
if (!this.state.Component) {
getComponent().then(Component => {
@mbostock
mbostock / .block
Last active May 1, 2023 21:50
Zoom to Domain
license: gpl-3.0
@joshnuss
joshnuss / app.js
Last active November 4, 2025 22:39
Express.js role-based permissions middleware
// the main app file
import express from "express";
import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db)
import authenticate from "./authentication"; // middleware for doing authentication
import permit from "./authorization"; // middleware for checking if user's role is permitted to make request
const app = express(),
api = express.Router();
// first middleware will setup db connection
@Dr-Nikson
Dr-Nikson / README.md
Last active April 23, 2026 07:17
Auth example (react + redux + react-router)
@ufukomer
ufukomer / git-commands.md
Last active July 7, 2020 11:08
Git Commands

Clone respotory to your pc

$ git clone 'ssh clone url'

Push

$ git add .
$ git commit -m "Your message"
$ git push -u origin master