Skip to content

Instantly share code, notes, and snippets.

View sraj's full-sized avatar

Suman Raj Venkatesan sraj

View GitHub Profile
@sraj
sraj / tmux.md
Created December 27, 2013 09:34 — forked from andreyvit/tmux.md

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

@sraj
sraj / s2s.md
Last active October 18, 2016 18:14

iOS

// UIWebViewDelegate
- (BOOL) webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType 
{
    NSURL *url = request.URL;
    if ([url.scheme isEqualToString:@"kiip"]) {
       if ([url.host isEqualToString:@"did_dismiss"]) {
 //handle 'close' logic here.
@sraj
sraj / Output
Created February 3, 2017 21:32 — forked from fabiopelosin/Output
This scripts prints out the a list of the command line tools used by Xcode. It provides insight to what Xcode does to process resource files.
-> CopyPNGFile
Copies a .png file resource, optionally compressing it.
$ copypng [options] $(IPHONE_OPTIMIZE_OPTIONS) [input] [output]
-> Code Sign
Code-sign a framework, application, or other built target.
$ /usr/bin/codesign
-> Strip Symbols
Remove or modify the symbol table of a Mach-O binary
// Place your settings in this file to overwrite the default settings
{
"editor.fontSize": 13,
"editor.insertSpaces": true,
"workbench.iconTheme": "vs-seti",
"workbench.activityBar.visible": false,
"workbench.statusBar.visible": true,
"editor.minimap.enabled": false,
"workbench.colorTheme": "One Dark Pro",
"window.zoomLevel": 0,
@sraj
sraj / dom_performance_reflow_repaint.md
Created March 16, 2021 07:01 — forked from faressoft/dom_performance_reflow_repaint.md
DOM Performance (Reflow & Repaint) (Summary)

DOM Performance

Rendering

  • How the browser renders the document
    • Receives the data (bytes) from the server.
    • Parses and converts into tokens (<, TagName, Attribute, AttributeValue, >).
    • Turns tokens into nodes.
    • Turns nodes into the DOM tree.
  • Builds CSSOM tree from the css rules.
@sraj
sraj / opensearch-compose-generate.sh
Created July 17, 2024 20:59 — forked from dtaivpp/opensearch-compose-generate.sh
This is a shell script for setting up a single node cluster for OpenSearch. This is something you can use in local development. It creates a secret password that is random every time.
#!/bin/bash
# 1. To run this script curl it locally:
# curl https://gist.githubusercontent.com/dtaivpp/c587d99a2cab441eba0314534ae87c86/raw -o opensearch-compose-bootstrap.sh
# 2. Change it to be executable:
# chmod +x opensearch-compose-generate.sh
# 3. Run it:
# ./opensearch-compose-generate.sh
#
# This will create:
# - docker-compose.yml file for OpenSearch