- https://www.youtube.com/watch?v=UzyoT4DziQ4 - Virtual Machines, JavaScript, and Assembler
- https://www.youtube.com/watch?v=aHm36-na4-4 - More Instantly Better Vim
- https://www.youtube.com/watch?v=6NHl5Q8zWNY - Kick-Ass Development
- https://www.destroyallsoftware.com/talks/wat - Wat
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
<?php | |
$ip = "10.0.11.145"; | |
$array = explode(".", $ip); | |
$numbers = $array[0] . "." . $array[1] . "." . $array[2]; | |
$numbers .= "."; | |
for($i = 0; $i < strlen($array[3]); $i++) { |
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
Podfile | |
Capfile | |
Gemfile | |
Gomfile | |
Makefile | |
Thorfile | |
Cakefile | |
Caskfile | |
Jakefile | |
Doxyfile |
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
use std::io; | |
fn main() { | |
// Iterate over the lines in io::stdin() | |
for line in io::stdin().lines() { | |
// Now print the line (line.unwrap() first) via the println!() macro | |
println!("{}", line.unwrap()); | |
} | |
} |
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 | |
# This script finds the number of cycles necessary to get to 1 via the | |
# Collatz conjecture. | |
use strict; | |
use warnings; | |
unless (defined $ARGV[0]) { | |
print("Supply the integer as the first argument."); | |
exit; | |
} |
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
int str_count(char *string, char *delim) { | |
int count = 0; | |
int i; | |
for (i = 0; i < strlen(string); i++) { | |
if (strncmp(&string[i], delim, strlen(string))) { | |
count++; | |
} | |
} | |
return count; |
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
// NOTE: This gist requires https://gist.github.com/boboman13/956405a90345f3ce477c. | |
char **str_split(char *string, char *delim) { | |
uint8_t size = str_count(string, "") + 1, i; | |
char** split = malloc(size * sizeof(char*) ); | |
for (i = 0; i < size; i++) { | |
if (i == 0) | |
split[i] = strtok(string, delim); | |
else | |
split[i] = strtok(NULL, delim); |
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
# Select, insert, update, delete | |
SELECT * FROM `my_table` WHERE `my_field` = 'my_value'; | |
INSERT INTO `my_table` (my_field, another_field) VALUES ('myFieldValue', 'AnotherFieldValue'); | |
UPDATE `my_table` SET `my_field` = 'aNewValue'; | |
DELETE FROM `my_table` WHERE `my_field` = 'a_special_value'; | |
# Get the schema of sorts for a table |
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
#import <stdio.h> | |
#import <pthread.h> | |
void *threadFunction(void *arg) { | |
// To be executed when called... | |
} | |
int main(void) { | |
pthread_t *thread; |
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 | |
BRANCH=master | |
FORMAT=tar.gz | |
EXPORT_LOCATION=/tmp/backup.tar.gz | |
git archive $BRANCH -o $EXPORT_LOCATION --format $FORMAT |
OlderNewer