Skip to content

Instantly share code, notes, and snippets.

View faisalmansoor's full-sized avatar

Faisal faisalmansoor

  • Practice Fusion
  • San Francisco, CA
View GitHub Profile
@faisalmansoor
faisalmansoor / .tmux.conf
Created March 30, 2023 18:47 — forked from astromechza/.tmux.conf
Byobu config (goes in ~/.byobu)
set -g default-shell /usr/bin/zsh
set -g default-command /usr/bin/zsh
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-attr default
# default window title colors
set-window-option -g window-status-fg colour244 #base0
set-window-option -g window-status-bg default
~/.byobu/keybindings.tmux
bind-key -n M-Up display-panes \; select-pane -U
bind-key -n M-Down display-panes \; select-pane -D
bind-key -n M-Left display-panes \; select-pane -L
bind-key -n M-Right display-panes \; select-pane -R
bind-key -n C-M-Left previous-window
bind-key -n C-M-Right next-window
@faisalmansoor
faisalmansoor / powershell.md
Last active November 3, 2015 02:31
PowerShell recepies

List all Packages with Projects

Get-Project -all 
| %  { Get-Package -ProjectName $_.Name } 
| select Id, Version, ProjectName 
| Sort-Object Id 
| Format-Table -Wrap -AutoSize
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using LinqStatistics;
namespace GuidHashCodeTest
{
class Program
{
@faisalmansoor
faisalmansoor / faraday-connection-pool-test.rb
Last active October 14, 2015 22:04
test faraday connection pool gem
require 'logger'
# we need a 3rd-party extension for some extra middleware:
require 'faraday_middleware'
require 'faraday_connection_pool'
Process.setproctitle("farady-pool-test")
class Faraday::Adapter::NetHttp
alias_method :old_net_http_connection, :net_http_connection
@faisalmansoor
faisalmansoor / deploy-solr-core.bat
Last active August 29, 2015 14:10
Deploy SOLR Core config to remote server
REM Deploys solr core config from windows client to solr on linux server
REM Assumes that plink and pscp are on path, and pagent.exe contains ssh keys for the linux server
REM Stops Solr service - Copies Solr config - Start Solr service
REM Usage: deploy-solr-core.bat UserName@Host CoreName
@echo off
if [%1]==[] goto usage
if [%2]==[] goto usage
@faisalmansoor
faisalmansoor / f#
Created August 21, 2013 22:36
Iterating using enumerator and looping
namespace FSharpHelper
{
[CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)]
[RequireQualifiedAccess]
[CompilationMapping(SourceConstructFlags.Module)]
public class MathHelper
{
[CompilationSourceName("sumEnum")]
public static T SumEnum<T>(FSharpList<T> list)
{