This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GistID: 4051243 | |
# The prompt | |
# enable color support of ls and also add handy aliases | |
setopt prompt_subst | |
autoload -U colors | |
colors | |
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do | |
eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}' | |
eval PR_LIGHT_$color='%{$fg[${(L)color}]%}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GistID: 4511178 | |
# To the extent possible under law, the author(s) have dedicated all | |
# copyright and related and neighboring rights to this software to the | |
# public domain worldwide. This software is distributed without any warranty. | |
# You should have received a copy of the CC0 Public Domain Dedication along | |
# with this software. | |
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. | |
# base-files version 4.1-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
typedef struct { | |
char* bits; | |
int size; | |
}bitvector; | |
bitvector* create_bitvec(int n_bits) { | |
bitvector* vec = (bitvector*)malloc(sizeof(bitvector)); | |
int size = sizeof(bitvector) * ceil(n_bits/8.0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// GistID: 6172227 | |
#include <stdio.h> | |
#include <stdlib.h> | |
struct node_t { | |
struct node_t *next; | |
int val; | |
}; | |
typedef struct node_t node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vector> | |
#include <iostream> | |
#include <algorithm> | |
#include <iterator> | |
#include <map> | |
using namespace std; | |
int fact(int n) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
┌──[chi@mint]──[~/android/system/packages/apps/Contacts]── (8e9a5fb...) * ──────── | |
$ git diff | |
diff --git a/src/com/android/contacts/dialpad/util/NameToNumberFactory.java b/src/com/android/contacts/dial | |
index c0adef6..3ca285b 100644 | |
--- a/src/com/android/contacts/dialpad/util/NameToNumberFactory.java | |
+++ b/src/com/android/contacts/dialpad/util/NameToNumberFactory.java | |
@@ -34,13 +34,15 @@ public class NameToNumberFactory { | |
// Check locale and returns matched class inherited from NameToNumber class. | |
NameToNumber instance; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GistID: 7287953 | |
startup_message off | |
escape ^X^X | |
caption always "%?%F%{-b 5w}%:%{-b bb}%? %H | %l | %m-%d %c |%?%F%{-b 4w}%?%L=%-Lw%45>%{-b w4}%n%f* %t%{-}%+Lw%-0<" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
# GistID: 7316128 | |
# example: argparse.pl arg1 arg2 arg3 --long-param x -l hh -a arg4 arg5 | |
# params = {"long"=>"x", "short"=>"hh", "switch-a":1} | |
# args = ("arg1", "arg2", "arg3", "arg4", "arg5") | |
use strict; | |
use 5.010; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// GistID: 7984760 | |
// KMP substring search && FSM substring search | |
#include <string> | |
#include <iostream> | |
#include <vector> | |
using namespace std; | |
typedef vector<vector<int> > FSMType; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0'?> | |
<!-- GistID: 8470342 --> | |
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> | |
<fontconfig> | |
<match target="font"> | |
<edit mode="assign" name="rgba"> | |
<const>rgb</const> | |
</edit> | |
</match> | |
<match target="font"> |
OlderNewer