Skip to content

Instantly share code, notes, and snippets.

@limitedmage
limitedmage / tangogitbash.reg
Created July 22, 2014 22:56
Save this file as a .reg and run it to have prettier colors in Git Bash in Windows.
REGEDIT4
[HKEY_CURRENT_USER\Console\Git Bash]
"ColorTable00"=dword:0036342E
"ColorTable01"=dword:00A46534
"ColorTable02"=dword:00069A4E
"ColorTable03"=dword:009B930B
"ColorTable04"=dword:000000CC
"ColorTable05"=dword:007B5075
"ColorTable06"=dword:0000A0C4
## get the weather condition (rainy, cloudy) for any given city
## by @limitedmage julianapena.com
import urllib2
def getWeather(city):
#create google weather api url
url = "http://www.google.com/ig/api?weather=" + urllib2.quote(city)
%% ITESM CEM, August 31, 2010.
%% Erlang Source File
%% Activity: Recursive Functions
%% Author: Juliana Pena, 1165536
-module(recursion).
-export([but_last/1, merge/2, insert/2, sort/1, binary/1, bcd/1, prime_factors/1, compress/1, encode/1, decode/1]).
but_last([_]) -> [];
but_last([H|T]) -> [H|but_last(T)].
#include <stdio.h>
#include <stdlib.h>
typedef struct _node {
int value;
struct _node *next;
} node;
void CheckNotNull(void *pointer);
-module(mc).
-compile(export_all).
pmap(Fun, Lst) ->
% get current Pid
Self = self(),
% get a unique idendifier
Ref = erlang:make_ref(),
delimiter |
create function num_emp (project char(2))
returns int
begin
declare cnt INT;
select count(ENO) into cnt from ASG where PNO = project group by PNO;
return cnt;
end|
delimiter ;
-- phpMyAdmin SQL Dump
-- version 3.2.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 27, 2010 at 05:56 PM
-- Server version: 5.1.41
-- PHP Version: 5.3.1
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
{
settings = IsolatedStorageSettings.ApplicationSettings;
Uri savedpage;
if (settings.TryGetValue("page", out savedpage))
{
Browser.Source = savedpage;
}
if (IsTrialMode())
@limitedmage
limitedmage / .hgignore
Created February 24, 2011 00:29
hgignore file for visual studio
# Ignore file for Visual Studio 2008
# use glob syntax
syntax: glob
# Ignore Visual Studio 2008 files
*.obj
*.exe
*.pdb
*.user
private void CreateAd()
{
#if !DEBUG
AdControl.TestMode = false;
#endif
AdControl ad = new AdControl(
#if DEBUG
"test_client",
"Image480_80",