Skip to content

Instantly share code, notes, and snippets.

View ac1dr3d's full-sized avatar
:shipit:
follow the white rabbit.

აკაკი ტყემალაძე ac1dr3d

:shipit:
follow the white rabbit.
View GitHub Profile
@ac1dr3d
ac1dr3d / ScrollManager.jsx
Created May 6, 2019 17:48 — forked from jeffijoe/ScrollManager.jsx
Save and restore scroll position in React
/*
The MIT License
Copyright (c) Jeff Hansen 2018 to present.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION W
@ac1dr3d
ac1dr3d / net.js
Created April 6, 2019 15:29 — forked from sid24rane/net.js
Simple TCP Client and Server in Node.js (Covering all useful Properties & Methods)
var net = require('net');
// creates the server
var server = net.createServer();
//emitted when server closes ...not emitted until all connections closes.
server.on('close',function(){
console.log('Server closed !');
});
@ac1dr3d
ac1dr3d / install_font_adobe_source_code_pro.sh
Created February 23, 2019 07:30 — forked from enzinier/install_font_adobe_source_code_pro.sh
Install font Adobe Source Code Pro on Ubuntu 16.04 LTS
#!/bin/sh
# Userland mode (~$USER/), (~/).
# ~/.fonts is now deprecated and that
#FONT_HOME=~/.fonts
# ~/.local/share/fonts should be used instead
FONT_HOME=~/.local/share/fonts
echo "installing fonts at $PWD to $FONT_HOME"
mkdir -p "$FONT_HOME/adobe-fonts/source-code-pro"
#!/usr/bin/env bash
case $1 in
-h|--help)
echo $'usage: docker-start\n\nStarts Docker (Docker.app) on macOS and waits until the Docker environment is initialized.'
exit 0
;;
esac
(( $# )) && { echo "ARGUMENT ERROR: Unexpected argument(s) specified. Use -h for help." >&2; exit 2; }
@ac1dr3d
ac1dr3d / tmux.md
Created January 29, 2019 08:33 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@ac1dr3d
ac1dr3d / tmux-cheatsheet.markdown
Created January 19, 2019 11:13 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

Keybase proof

I hereby claim:

  • I am ac1dr3d on github.
  • I am kaki (https://keybase.io/kaki) on keybase.
  • I have a public key ASDV_5zPBngFsvQI3Eq_gxw6qOFIgNVRqwoVdbq-DnQGKgo

To claim this, I am signing this object:

@ac1dr3d
ac1dr3d / core_test.clj
Created May 20, 2018 10:10 — forked from jindrichmynarz/core_test.clj
Example of generative testing of a SOAP API in Clojure
(ns soap-test.core-test
(:require [clojure.test :refer :all]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]
[clojure.test.check.clojure-test :refer [defspec]]
[clj-soap.core :as soap :refer [obj->soap-str]]))
; Boilerplace method required by the clj-soap library
(defmethod obj->soap-str :currency [obj argtype] (str obj))
@ac1dr3d
ac1dr3d / spacemacs-cheshe.md
Created March 6, 2018 19:09 — forked from robphoenix/spacemacs-cheshe.md
Spacemacs Cheat Sheet

Useful Spacemacs commands

  • SPC q q - quit
  • SPC w / - split window vertically
  • SPC w - - split window horizontally
  • SPC 1 - switch to window 1
  • SPC 2 - switch to window 2
  • SPC w c - delete current window
  • SPC TAB - switch to previous buffer
  • SPC b b - switch buffers
"Plugins"
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'lambdatoast/elm.vim.git'