This file contains hidden or 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 <string.h> | |
| #include <stdio.h> | |
| #define INT_BITS_NUM (8 * sizeof(int)) | |
| void intncpy(int src, char *dest, int len) | |
| { | |
| int bit = INT_BITS_NUM - 1; | |
| int pos, is_set; |
This file contains hidden or 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
| int main(int argc, char *argv[]) | |
| { | |
| int i = 10; | |
| int j = 15; | |
| int k = 20; | |
| int l = i + j; | |
| return 0; | |
| } |
This file contains hidden or 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
| source 'https://rubygems.org' | |
| gem 'sidekiq', '~> 3' | |
| gem 'sidetiq', '~> 0.6.1' |
This file contains hidden or 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 main | |
| import ( | |
| "time" | |
| ) | |
| func main() { | |
| ticker := time.Tick(100 * time.Millisecond) | |
| for { | |
| select { |
This file contains hidden or 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 main | |
| import "log" | |
| import "net/http" | |
| import "time" | |
| type Response struct { | |
| StatusCode int | |
| Url string | |
| } |
This file contains hidden or 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
| % brew install postgis | |
| ==> Downloading http://download.osgeo.org/postgis/source/postgis-2.1.2.tar.gz | |
| Already downloaded: /Library/Caches/Homebrew/postgis-2.1.2.tar.gz | |
| ==> ./autogen.sh | |
| ;==> ./configure --with-projdir=/usr/local --with-jsondir=/usr/local/opt/json-c --with-pgconfig=/usr/local/Cellar/postgresql/9.3.4/bin/pg_config --disable-nls | |
| checking proj_api.h usability... yes | |
| checking proj_api.h presence... yes | |
| checking for proj_api.h... yes | |
| checking for pj_get_release in -lproj... yes | |
| configure: error: Cannot find json dev files in "/usr/local/opt/json-c" |
This file contains hidden or 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 main | |
| import ( | |
| "flag" | |
| "fmt" | |
| "io" | |
| "log" | |
| "net/http" | |
| "net/url" | |
| "os" |
This file contains hidden or 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 main | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "log" | |
| "os/exec" | |
| "os" | |
| "strings" | |
| ) |
This file contains hidden or 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 main | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "log" | |
| "os" | |
| "os/exec" | |
| ) |
This file contains hidden or 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> | |
| #define RED "\x1B[31m" | |
| #define GREEN "\x1B[32m" | |
| #define NORMAL "\x1B[0m" | |
| #define STR(s) #s | |
| #define TESTLINE(line) " ("__FILE__ ":" STR(line) ")" | |
| #define test_assert(A, B) if(!(A)) { return B TESTLINE(__LINE__); }; |