Skip to content

Instantly share code, notes, and snippets.

View Imater's full-sized avatar
🏠
Working from home

Вецель Евгений Imater

🏠
Working from home
View GitHub Profile
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@jashmenn
jashmenn / final-cut-it-out.js
Created September 21, 2017 11:44
Remove Silence from Final Cut Pro clips, automatically, using ffmpeg timecodes and OSX JavaScript Automation - Demo: https://imgur.com/a/Zisav
#!/usr/bin/env osascript -l JavaScript
/**
* Delete silence from Final Cut Pro timeline using a script.
* Demo: https://imgur.com/a/Zisav
*
* This script accepts an ffmpeg silencedetect log as input.
*
* To setup, have fcp running along with your clip selected. Ensure that the
* timecode will start at zero before running this script. That is, if your clip

Twin Components

Я также спросил это на GitHub. Предположим, есть компоненты Signin и Signup. Они близнецы:

Signup:

<main>
  <h1 className={styles.h1}>Sign Up</h1>
@sangdongvan
sangdongvan / init.vim
Last active December 4, 2019 06:40
Neovim configuration
" Setup vim-plug -----------------------------------------------------------{{{
" Declare Plugin system Config
call plug#begin('~/.local/share/nvim/plugged')
" UI enhance
Plug 'Yggdroot/indentLine'
Plug 'airblade/vim-gitgutter'
Plug 'itchyny/lightline.vim'
function calcFletcherSum(data) {
var length = data.length, i = 0, sum1 = 0xFF, sum2 = 0xFF;
while (length) {
var tlen = length > 21 ? 21 : length;
length -= tlen;
do {
var ch = data.charCodeAt(i++);
if (ch > 255) {
var ch2 = ch >> 8;
ch &= 0xFF;
@jincod
jincod / index.coffee
Created August 22, 2014 07:30
Internet magazine
app.post '/pay', (req, res) ->
payment =
account: req.body.account
value: req.body.value
transactionId: (Math.random() * 1e18).toString(36)
res.redirect "#{appUrl}/#{payment.account}/#{payment.value}/#{payment.transactionId}?returnUrl=#{returnUrl}"
app.post '/payment', (req, res) ->
input = req.body.account + req.body.value + req.body.transactionId + secureKey
sign = crypto.createHash("md5").update(input).digest("hex")
@erikreagan
erikreagan / mac-apps.md
Created August 4, 2012 19:18
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

@nf
nf / hello-node.js
Created July 6, 2012 21:14
Hello world web server that scales across multiple processors
var cluster = require('cluster');
var http = require('http');
var numCPUs = require('os').cpus().length;
if (cluster.isMaster) {
// Fork workers.
for (var i = 0; i < numCPUs; i++) {
cluster.fork();
}
cluster.on('exit', function(worker, code, signal) {
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active November 5, 2024 21:42
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@shripadk
shripadk / gist:652819
Created October 29, 2010 03:10
Express authentication using Redis for session store and Couchdb for database (in coffeescript!)
###
Module dependencies
###
require.paths.unshift "#{__dirname}/lib/support/express-csrf/"
require.paths.unshift "#{__dirname}/lib/support/node_hash/lib/"
express = require 'express'
app = module.exports = express.createServer()
RedisStore = require 'connect-redis'