Skip to content

Instantly share code, notes, and snippets.

@newphp
newphp / License Sublime Text 3.2.2.md
Created November 22, 2021 02:16 — forked from nobojithalder/License Sublime Text 3.2.2.md
License for Sublime Text Version 3.2.2, Build 3211

If anyone's looking for a solution for licensing Sublime Text!

Here goes an easy tutorial on how to register, Sublime Text Version 3.2.2, Build 3211

  • Go to https://hexed.it/
  • Click on "Open file" and select "sublime_text.exe" executable file. [This 'sublime_text.exe' file should be located at C:\Program Files\Sublime Text 3]
  • Go to "Search" and in "Search for" field, search for "97 94 0D" and click "Search now" button.
  • One result will appear below, click on it.
@newphp
newphp / ffmpeg.md
Created September 27, 2019 14:08 — forked from eyecatchup/ffmpeg.md
Some common ffmpeg commands, I tend to forget..

cut sequence from mp4 video

ffmpeg -ss <start_time_hh:ii:ss> -i input.mp4 -to <length_in_hh:ii:ss_from_start> -c copy ./out.mp4
ffmpeg -ss 00:47:42 -i input.mp4 -to 00:01:49 -c copy ./out.mp4

create thumbnail images from input video (@30fps)

@newphp
newphp / datadir.conf
Last active February 25, 2019 14:12
/etc/systemd/system/mariadb.service.d/datadir.conf
[Service]
ProtectHome=false
@newphp
newphp / gist:3100af09c5c1e1f36005a0144c7e8c96
Last active October 18, 2017 20:13 — forked from lsauer/gist:2907369
Google Chrome special pages for memory, debug, resources, profiling, downloads...

lsauer.com


Overview of all chrome:// pages.

  • List by calling chrome://about/
  • Following is a direct dump from the 'about' page for reference

List of Pages as per v20.xxx

@newphp
newphp / configure.sh
Created December 14, 2015 22:43
Build php-7.0.0 on Debian jessie
./configure \
--prefix=/usr/local/php-7.0.0 \
--build=x86_64-linux-gnu \
--host=x86_64-linux-gnu \
--enable-bcmath \
--enable-calendar \
--enable-ctype \
--enable-dba \
--enable-exif \
--enable-fpm \
#!/bin/bash
###########################################################
# このスクリプトの特徴
#
# 受信・通過については基本的に破棄し、ホワイトリストで許可するものを指定する。
# 送信については基本的に許可する。ただし、サーバが踏み台になり外部のサーバに迷惑をかける可能性があるので、
# 心配な場合は、送信も受信同様に基本破棄・ホワイトリストで許可するように書き換えると良い。
###########################################################
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
worker_processes 2;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
use epoll;
}
location /resize {
alias /tmp/nginx/resize;
set $width 150;
set $height 100;
set $dimens "";
if ($uri ~* "^/resize_(\d+)x(\d+)/(.*)" ) {
set $width $1;
set $height $2;
set $image_path $3;
@newphp
newphp / install-shadowsocks-libev.sh
Created July 12, 2014 21:43
shadowsocks-libev one click install shell script for CentOS
#! /bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
#===============================================================================================
# System Required: CentOS6.x (32bit/64bit)
# Description: Install Shadowsocks(libev) for CentOS
# Author: Teddysun <i@teddysun.com>
# Intro: http://teddysun.com/357.html
#===============================================================================================