Skip to content

Instantly share code, notes, and snippets.

View mamift's full-sized avatar

Muhammad Miftah mamift

View GitHub Profile
@fjl
fjl / Main.cs
Created November 15, 2012 18:20
detect foreground window switch in C#
using System;
using System.Runtime.InteropServices;
using System.ComponentModel;
namespace ShellEventsTest
{
class Program
{
static void Main(string[] args)
{
@incompl
incompl / gist:3819571
Last active March 19, 2023 16:05
Git needs help

The git command-line interface sucks

When I use git, I'm scared I'll break something. I just talked to an open source celebrity who has used git for 3-4 years who avoids using the CLI because he's afraid he'll break something, and uses Tower when possible. I recently had a client accidentally delete their work because they didn't understand git. My fear of breaking something is well-founded.

You can't put a price on the confidence that source control is supposed to give you. That confidence suffers when people are afraid of causing irreparable damage during normal use.

This article lists a few ideas on what git can do to improve.

A Controlled Vocabulary

@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active July 19, 2025 11:41
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@billsinc
billsinc / gist:1157544
Created August 19, 2011 18:10
Remove Firebird DB from MacOS
#!/bin/sh
echo "Clean Services"
echo "Clean User"
dscl localhost -delete /Local/Default/Users/firebird
echo "Clean Group"
dscl localhost -delete /Local/Default/Groups/firebird
if [ -f "/Library/StartupItems/Firebird" ]; then
echo "Remove SuperServer StartupItem"
rm -fr /Library/StartupItems/Firebird
fi
@hubgit
hubgit / efetch-pubmed.xsd
Created March 28, 2010 11:12
a W3C XML Schema description of the EUtils EFetch response format
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/XMLSchema.xsd http://www.w3.org/2001/XMLSchema.xsd" xmlns:eutils="http://www.ncbi.nlm.nih.gov/eutils" targetNamespace="http://www.ncbi.nlm.nih.gov/eutils" elementFormDefault="qualified">
<!-- http://www.ncbi.nlm.nih.gov/entrez/query/DTD/pubmed_100101.dtd -->
<complexType name="AbstractType">
<sequence>
<element ref="eutils:AbstractText"/>
<element ref="eutils:CopyrightInformation" minOccurs="0"/>
</sequence>