Skip to content

Instantly share code, notes, and snippets.

@dreamiurg
dreamiurg / .gitconfig
Created April 14, 2011 11:13
git configuration with BeyondCompare as difftool/mergetool and pretty log
[alias]
st = status
co = checkout
ci = commit
br = branch
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset' --abbrev-commit --date=relative
[color]
ui = auto
@mediabounds
mediabounds / floatsign.sh
Last active March 31, 2024 18:43
A small bash script to re-sign iOS applications.
# !/bin/bash
# Copyright (c) 2011 Float Mobile Learning
# http://www.floatlearning.com/
#
# 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
@BrettBukowski
BrettBukowski / gist:5347463
Last active December 29, 2023 06:48
Filter emails in Mail.app with regular expressions
-- Mail.app can't run a "Contains" filter with a regex,
-- so you can't filter on HTML content. Until now.
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
try
repeat with theMessage in theMessages
-- Getting the content as string converts all HTML tags to '?' and just leaves text content
set theBody to quoted form of (theMessage's content as string)
-- It's awkwardly hard to get sed to work w/ mult. lines, so collapse newlines
set theCommandString to "echo " & theBody & " | tr '\\n' ' ' | sed \"s/brett Author/*MATCHED*(&)/\"" as string
@Spudz76
Spudz76 / WebStorm-Cygwin-HOWTO.md
Last active February 18, 2024 13:23
Set up Windows Powershell to use cygwin where possible and optionally autolaunch bash when it starts up

#WebStorm Cygwin with "PowerBash" Begin with the guide by @nullivex here for general installation. NOTE: This is all with 32-bit stuff even on x64 platform. Cygwin32, and WebStorm and Node.js etc all set up 32-bit. You may skip the Git parts of that guide, and instead install Cygwin and the git and openssh it contains. Otherwise, you must NOT set up git in Cygwin so that the Native Git is found. But, that would sort of negate most of the gains herein. If you already use Cygwin and its git and have openssh keys all set up for Github and etc, this is a way to keep one set of configurations, and a familiar shell.

This will set up WebStorm to use Cygwin versions of everything except for:

  • Node.js (because there is no Cygwin version currently)
  • Python (because some of the Node.js/npm thin
@marnix
marnix / Remove-File-Eventually.ps1
Created November 20, 2013 15:47
PowerShell command to delete a file, if possible immediately, and if it is in use at the next boot.
param(
[parameter(Mandatory=$true)]
[string] $path
)
# the code below has been used from
# https://blogs.technet.com/b/heyscriptingguy/archive/2013/10/19/weekend-scripter-use-powershell-and-pinvoke-to-remove-stubborn-files.aspx
# with inspiration from
# http://www.leeholmes.com/blog/2009/02/17/moving-and-deleting-really-locked-files-in-powershell/
# and error handling from
@mikhaelkh
mikhaelkh / ChrUpdWin.cmd
Last active December 13, 2020 04:56
Chromium updater for Windows
@echo off
pushd "%~dp0"
if exist running exit
if "%PROCESSOR_ARCHITECTURE%" == "x86" set platform=Win
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" set platform=Win_x64
if "%PROCESSOR_ARCHITEW6432%" == "AMD64" set platform=Win_x64
if "%platform%" == "" echo Supported only x86 and amd64 cpu architectures. & pause & exit
set channel=snapshots
set url=https://storage.googleapis.com/chromium-browser-%channel%/%platform%
set wget=wget.exe -N
@dferg
dferg / howto-tomato-install-entware.markdown
Last active January 22, 2024 04:40
HOWTO: Install entware on Shibby TomatoUSB

Introduction

This howto describes installing entware for the Tomato open-source router firmware.

Requirements

  • USB stick - 1G or more in size
  • USB-capable router running TomatoUSB.

This Howto Was Tested With

@xvitaly
xvitaly / remove_crw.cmd
Last active July 21, 2024 21:01
Remove telemetry updates for Windows 7 and 8.1
@echo off
echo Uninstalling KB3075249 (telemetry for Win7/8.1)
start /w wusa.exe /uninstall /kb:3075249 /quiet /norestart
echo Uninstalling KB3080149 (telemetry for Win7/8.1)
start /w wusa.exe /uninstall /kb:3080149 /quiet /norestart
echo Uninstalling KB3021917 (telemetry for Win7)
start /w wusa.exe /uninstall /kb:3021917 /quiet /norestart
echo Uninstalling KB3022345 (telemetry)
start /w wusa.exe /uninstall /kb:3022345 /quiet /norestart
echo Uninstalling KB3068708 (telemetry)

#Install Windows 8 to a VHD file on a USB drive! This Tutorial has been adapted from misty's method 3 from reboot.pro.

Introduction

This tutorial shows how you can create a Virtual Hard Disk (VHD) file on an external USB Hard drive and make the system boot to Windows 8 from the VHD file rather than from a flat file structure on the USB drive.

Note: A much easier method is now available! Use the free version of WinToUSB to quickly create a bootable USB drive.

@jhorikawa
jhorikawa / getPinterestBoardPins.py
Last active March 9, 2023 21:32
Download Pinterest images from specific board using Python.
import pprint
import requests
import os
from urllib.request import urlopen
accessToken = "xxxxxxxxxx"
boardId = "0000000000"
folderPath = "./images"
response = requests.get(