#!/bin/sh -x
# $1 - input video file, e.g. video.mp4
# $2 - timestamp, e.g. 00:33
# $3 - output image file, e.g. output.jpg
ffmpeg -ss $2 -i $1 -vframes 1 -q:v 2 $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
using System; | |
using System.Linq; | |
using System.Net; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace Blog_CSharpAsync | |
{ | |
class Program | |
{ |
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
# Amend manifest to tell Windows that the application is DPI aware (needed for Windows 8.1 and up) | |
IF (MSVC) | |
IF (CMAKE_MAJOR_VERSION LESS 3) | |
MESSAGE(WARNING "CMake version 3.0 or newer is required use build variable TARGET_FILE") | |
ELSE() | |
ADD_CUSTOM_COMMAND( | |
TARGET ${TARGET_TARGETNAME} | |
POST_BUILD | |
COMMAND "mt.exe" -manifest \"${CMAKE_CURRENT_SOURCE_DIR}\\dpiawarescaleing.manifest\" -inputresource:\"$<TARGET_FILE:${TARGET_TARGETNAME}>\"\;\#1 -outputresource:\"$<TARGET_FILE:${TARGET_TARGETNAME}>\"\;\#1 | |
COMMENT "Adding display aware manifest..." |
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
#include <string> | |
#include <locale> | |
#include <codecvt> | |
//UTF-8 to UTF-16 | |
std::string source; | |
//... | |
std::wstring_convert<std::codecvt_utf8_utf16<char16_t>,char16_t> convert; | |
std::u16string dest = convert.from_bytes(source); | |
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
import requests | |
def format_bytes(size): | |
# 2**10 = 1024 | |
power = 2 ** 10 | |
n = 0 | |
power_labels = {0: '', 1: 'K', 2: 'M', 3: 'G', 4: 'T'} | |
while size > power: | |
size /= power |
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
-- Please credit me (The epic face 007) when sharing this script. | |
local Material = loadstring(game:HttpGet("https://raw.githubusercontent.com/Kinlei/MaterialLua/master/Module.lua"))() | |
local _ = loadstring(game:HttpGet("https://raw.githubusercontent.com/TheEpicFace007/lua-lodash/master/lodash.lua"))() | |
local Players = game:GetService("Players") | |
request = syn ~= nil and syn.request or http_request ~= nil and http_request or request | |
local function findPlayer(nameOrDisplayName) | |
local players = game:GetService("Players") | |
for k, v in pairs(game:GetService("Players"):GetPlayers()) do |