Skip to content

Instantly share code, notes, and snippets.

View sgtrusty's full-sized avatar
💭
happy im heeeere

Santiago González sgtrusty

💭
happy im heeeere
View GitHub Profile
@micrypt
micrypt / config.hs
Created August 29, 2011 10:45
XMonad config
atom_WM_TAKE_FOCUS ::
X Atom
atom_WM_TAKE_FOCUS =
getAtom "WM_TAKE_FOCUS"
takeFocusX ::
Window
-> X ()
takeFocusX w =
withWindowSet . const $ do
@sashainparis
sashainparis / xmonad.hs
Created June 24, 2013 15:30
xmonad is a tiling window manager for Linux: http://xmonad.org/
-------------------- imports --------------------
--necessary
import XMonad
import qualified XMonad.StackSet as W
import qualified Data.Map as M
import System.Exit
import Graphics.X11.Xlib
import System.IO (Handle, hPutStrLn)
@jksdua
jksdua / bug-reporting-template.html
Created January 21, 2014 13:59
Bug reporting HTML template - see comment for more details :)
<html>
<head>
<title>Report a Bug</title>
<style type="text/css">
/* apply a natural box layout model to all elements */
*, *:before, *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
#!/usr/bin/env zsh
function usage() {
cat <<EOF
USAGE i3-xephyr start|stop|restart|run
start Start nested i3 in xephyr
stop Stop xephyr
restart reload i3 in xephyr
run run command in nested i3
EOF
@vladikoff
vladikoff / doskey.md
Last active March 16, 2025 08:45
Setup Persistent Aliases & Macros in Windows Command Prompt (cmd.exe) using DOSKey

Setup Persistent Aliases & Macros in Windows Command Prompt (cmd.exe) using DOSKey

Saved from Archive.org, Date: May 14, 2010 Author: Jesse Webb

http://web.archive.org/web/20140330024520/http://devblog.point2.com/2010/05/14/setup-persistent-aliases-macros-in-windows-command-prompt-cmd-exe-using-doskey/

Our development machines here at Point2 are not standardized; we have a mixture of Windows XP, 7, and Mac OSX/Unix computers. I find myself constantly switching back and forth between command prompt interfaces when pair programming. As a result, I catch myself using “ls” to list a directories contents regardless of what system I am on. I am currently using a Windows XP machine for my developer box and I wanted to setup an alias to the “ls” command to actually perform a “dir”. Here is how I accomplished it…

There is a command available in a Window’s shell that let’s you “alias” command to whatever you please: DOSKey. It allows you to create “macros” to execute one or more other commands with a custom nam

@leonardofed
leonardofed / README.md
Last active March 14, 2025 18:19
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@dogfuntom
dogfuntom / Vim Ideas.md
Last active January 10, 2024 14:40
cheat sheet about registers and marks in vim emulators #vs #vim #vsvim #vsc

Finding opportunities to apply advanced Vim

When it comes to Vim emulators, how to do an advanced operation is not the hard part. The hard part is remembering/recognizing that some routine operation can be helped by Vim.

Log method call

Useful for understanding sloppily/poorly written legacy code. Given a bunch of methods like this:

private void ConfusinglyNamedAndConfusinglyUsedMethod()

@mjrousos
mjrousos / BasicMiddleware.cs
Last active April 13, 2021 21:47
CustomMiddleware
// The middleware delegate to call after this one finishes processing
private readonly RequestDelegate _next;
public SOAPEndpointMiddleware(RequestDelegate next)
{
_next = next;
}
@SKempin
SKempin / Git Subtree basics.md
Last active February 28, 2025 06:58
Git Subtree basics

Git Subtree Basics

If you hate git submodule, then you may want to give git subtree a try.

Background

When you want to use a subtree, you add the subtree to an existing repository where the subtree is a reference to another repository url and branch/tag. This add command adds all the code and files into the main repository locally; it's not just a reference to a remote repo.

When you stage and commit files for the main repo, it will add all of the remote files in the same operation. The subtree checkout will pull all the files in one pass, so there is no need to try and connect to another repo to get the portion of subtree files, because they were already included in the main repo.

Adding a subtree

Let's say you already have a git repository with at least one commit. You can add another repository into this respository like this:

@schnerd
schnerd / lazy-load-puppeteer.js
Created April 18, 2018 03:21
Lazy-loading content in Puppeteer
function wait (ms) {
return new Promise(resolve => setTimeout(() => resolve(), ms));
}
export default async function capture(browser, url) {
// Load the specified page
const page = await browser.newPage();
await page.goto(url, {waitUntil: 'load'});
// Get the height of the rendered page