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
Here is some C code. Does this code have any vulnerabilities? | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define BUFFERSIZE 200 | |
#define TRUE 1 | |
#define FALSE 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
Sometimes when I resume my macbook from sleep, the WiFi cycles in and out of working. It's fairly regular: | |
down for 51 seconds and up for 11 seconds most of the time. What could cause this? | |
➜ ~ ping 8.8.8.8 | |
PING 8.8.8.8 (8.8.8.8): 56 data bytes | |
Request timeout for icmp_seq 0 | |
Request timeout for icmp_seq 1 | |
Request timeout for icmp_seq 2 | |
64 bytes from 8.8.8.8: icmp_seq=3 ttl=59 time=4.976 ms |
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 void Main() | |
{ | |
var date1 = DateTime.Parse("2017-07-14T19:00:00.0000000-07:00"); | |
var date2 = DateTime.UtcNow; // <- today at "19:09:56" UTC or "12:09:56" PDT | |
Console.WriteLine(date1 > date2); // False <-- what?? | |
Console.WriteLine(date1.ToUniversalTime() > date2); // True | |
var nowStr = DateTime.UtcNow.ToString("o"); | |
Console.WriteLine(nowStr); // "2017-07-14T19:09:56.0616752Z" |
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
Run this SQL: | |
CREATE TEMPORARY TABLE SORTER ( name VARCHAR ); | |
INSERT INTO SORTER (name) VALUES ('A B'); | |
INSERT INTO SORTER (name) VALUES ('AB'); | |
INSERT INTO SORTER (name) VALUES ('A C'); | |
INSERT INTO SORTER (name) VALUES ('AC'); | |
SELECT * FROM SORTER ORDER BY name; | |
SELECT * FROM SORTER ORDER BY name DESC; |
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
### Keybase proof | |
I hereby claim: | |
* I am cxxr on github. | |
* I am cxxr (https://keybase.io/cxxr) on keybase. | |
* I have a public key whose fingerprint is 341B 18FC C906 6E90 B01C FCC9 C89D 0488 91CF 72E7 | |
To claim this, I am signing this object: |
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
package me.seancassidy.search; | |
import com.google.gson.FieldNamingPolicy; | |
import com.google.gson.Gson; | |
import com.google.gson.GsonBuilder; | |
import com.google.gson.JsonElement; | |
import org.elasticsearch.ElasticsearchException; | |
import org.elasticsearch.ElasticsearchTimeoutException; | |
import org.elasticsearch.action.ListenableActionFuture; | |
import org.elasticsearch.action.search.SearchPhaseExecutionException; |
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" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.example</groupId> | |
<artifactId>root-pom</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>pom</packaging> | |
<name>Root POM</name> | |
<url>http://git.example.com/rootpom.git</url> |
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
$ python | |
Python 2.7.5 (default, Sep 12 2013, 21:33:34) | |
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import socket | |
>>> socket.getfqdn() | |
'Seans-MacBook-Pro.local' | |
>>> socket.getfqdn() | |
'187.1.168.192.in-addr.arpa' | |
>>> socket.getfqdn() |