Skip to content

Instantly share code, notes, and snippets.

View airstrike's full-sized avatar
🎯
bringing presentations and spreadsheets to the 21st century

Andy airstrike

🎯
bringing presentations and spreadsheets to the 21st century
View GitHub Profile
@airstrike
airstrike / GetUserInfo.bas
Created January 2, 2014 17:20
Helper functions for fetching user information from the system/environment/network.
Private Type ExtendedUserInfo
EUI_name As Long
EUI_password As Long ' Null, only settable
EUI_password_age As Long
EUI_priv As Long
EUI_home_dir As Long
EUI_comment As Long
EUI_flags As Long
EUI_script_path As Long
EUI_auth_flags As Long
@acdha
acdha / custom-log-filtering-and-formatting.py
Created February 26, 2014 21:19
Example of how to filter or apply custom formatting using Python's logging library
#!/usr/bin/env python
# encoding: utf-8
from pprint import pformat, pprint
import logging
class PasswordMaskingFilter(logging.Filter):
"""Demonstrate how to filter sensitive data:"""
@PurpleBooth
PurpleBooth / README-Template.md
Last active July 21, 2025 15:21
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@expersso
expersso / movies.R
Created January 6, 2016 13:45
Movie budgets and box office success (1955-2015)
library(dplyr)
library(tidyr)
library(ggplot2)
library(lubridate)
library(stringr)
library(rvest)
library(xml2)
library(OECD)
# Get budget and box office data
@kizzx2
kizzx2 / hammerspoon-move-resize.lua
Last active December 19, 2022 06:47
Hammerspoon script to move/resize window under cursor
-- Inspired by Linux alt-drag or Better Touch Tools move/resize functionality
function get_window_under_mouse()
-- Invoke `hs.application` because `hs.window.orderedWindows()` doesn't do it
-- and breaks itself
local _ = hs.application
local my_pos = hs.geometry.new(hs.mouse.getAbsolutePosition())
local my_screen = hs.mouse.getCurrentScreen()
@airstrike
airstrike / autoexec.cfg
Last active February 26, 2020 00:29
CS:GO autoexec script
cl_crosshairsize 1; cl_crosshairgap 1; cl_crosshairthickness 0; cl_crosshaircolor 1; cl_crosshaircolor_b 250; cl_crosshaircolor_g 250; cl_crosshaircolor_r 250; cl_crosshairdot 1; cl_crosshairstyle 5; cl_crosshairalpha 250; cl_crosshairgap_useweaponvalue 0; cl_crosshairusealpha 1; cl_crosshair_drawoutline 0; cl_crosshair_sniper_width 1;
viewmodel_fov 68; viewmodel_offset_x 2.5; viewmodel_offset_y 0; viewmodel_offset_z -1.5; viewmodel_presetpos 3; cl_viewmodel_shift_left_amt 1.5; cl_viewmodel_shift_right_amt 0.75; viewmodel_recoil 0; cl_righthand 1;
alias "m4/ak47" "buy m4a1; buy ak47"
alias "aug/sg556" "buy aug; buy sg556"
alias "galilar/famas" "buy galilar; buy famas"
alias "g3sg1/scar20" "buy g3sg1; buy scar20"
alias "vesthelm/vest" "buy vesthelm; buy vest"
alias "vest" "buy vest"
@evanwill
evanwill / gitBash_windows.md
Last active July 20, 2025 07:52
how to add more utilities to git bash for windows, wget, make

How to add more to Git Bash on Windows

Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).

If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so

@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active July 17, 2025 04:36
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@HiImJulien
HiImJulien / Swift Meets CCxx.md
Last active June 30, 2025 03:18
This gist is a simple example on how to call a function written in swift from C/C++, without taking the detour via Objective-C/C++.

Swift Meets C/C++

This gist is a simple example on how to call a function written in swift from C/C++, without taking the detour via Objective-C/C++.


In this example we're going to invoke a function called say_hello, which, as the name already suggests, prints "Hello, World!" to the terminal.

@ivanbrennan
ivanbrennan / show-256-colors.sh
Last active October 25, 2024 18:03
Use Bash to show all 256 colors supported by xterms
#!/usr/bin/env bash
PADDING='Padding'
main() {
local xterm_start=0 \
xterm_width=8 \
xterm_height=2
local cube_start=$((xterm_start + xterm_width * xterm_height)) \