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
static char * lt15_xpm[] = { | |
"15 15 4 1", | |
" c None", | |
". c #FFFF00", | |
"+ c #1AA302", | |
"@ c #FC0000", | |
"...............", | |
"...............", | |
"...............", | |
"...............", |
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
%% @doc Return pid of a process which opened a socket binded to a given port. | |
-spec get_pid(inet:port_number(), 'tcp' | 'udp' | 'sctp') -> pid() | undefined. | |
get_pid(Port, Proto) when is_integer(Port), is_atom(Proto) -> | |
Name = name(Proto), | |
InetPorts = [P || P <- erlang:ports(), | |
{name, Name} == erlang:port_info(P, name)], | |
try | |
lists:filter( | |
fun (P) -> |
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
# module and export all | |
snippet mod | |
-module(${1:`Filename('', 'my')`}). | |
-compile([export_all]). | |
start() -> | |
${2} | |
stop() -> |
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
-module(recaptcha). | |
-export([verify/3]). | |
-define(PRIVATE_KEY, "YOU_RPRIVATE_KEY"). | |
-define(URL, "http://www.google.com/recaptcha/api/verify"). | |
%% @doc WARNING: 'inets' application should be started! | |
-spec verify(list(), list(), list()) -> ok | | |
{error, invalid_site_private_key | invalid_request_cookie | | |
incorrect_captcha_sol}. |
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
#!/bin/bash | |
# Update /etc/hosts with public non-elastic IPs of EC2 instances. | |
# Assumes that a name is set for each instance and there is only one value inside tags section. | |
PREFIX="aws_" | |
FILTER=".Reservations[].Instances[] | | |
select(.PublicIpAddress != null) | | |
.PublicIpAddress + \" $PREFIX\" + .Tags[].Value" |
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
diff --git a/gtk+-2/pinentry-gtk-2.c b/gtk+-2/pinentry-gtk-2.c | |
index 421bc02..91a9fbf 100644 | |
--- a/gtk+-2/pinentry-gtk-2.c | |
+++ b/gtk+-2/pinentry-gtk-2.c | |
@@ -186,7 +186,7 @@ button_clicked (GtkWidget *widget, gpointer data) | |
gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (time_out))); | |
#endif | |
- s = gtk_secure_entry_get_text (GTK_SECURE_ENTRY (entry)); | |
+ s = gtk_entry_get_text (GTK_ENTRY (entry)); |
NewerOlder