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 <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
void main() { | |
char *str; | |
str = malloc(sizeof(char) * 15); | |
strcpy(str, "hakuna matata!"); // this line should copy "hakuna matata!" | |
// into our char array | |
printf("%s\n", str); |
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> | |
void square(int *num) { | |
*num *= *num; | |
} | |
int main() { | |
int x = 4; | |
square(&x); | |
printf("%d\n", x); |
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> | |
int main(int argc, char ** argv){ | |
unsigned i = 1; | |
if (argc > 1) { | |
prt: | |
printf("%s\n", argv[i]); | |
i++; | |
if (i < argc) { |
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> | |
int factorial (int n) { | |
int i = 1; | |
while (n > 1) { | |
i *= n; | |
n -= 1; | |
} | |
return 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
#include <stdio.h> | |
int main(); | |
int main(){ | |
unsigned int i, k; | |
unsigned int j = 0; | |
for (i = 0; i < 100; i++) { | |
printf("%d\n", j); |
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
require 'rubygems' | |
require 'mechanize' | |
FIRST_NAME = 'FIRST_NAME' | |
LAST_NAME = 'LAST_NAME' | |
PHONE = 'PHONE' | |
EMAIL = '[email protected]' | |
PARTY_SIZE = 2 | |
SCHEDULE_RANGE = { :start_time => '19:00', :end_time => '20:30' } |
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/sh | |
REPODIR=~/repo/rhel/ | |
SRPMS=$REPODIR/SRPMS | |
RELEASES=6 | |
ARCHS=x86_64 | |
CREATEREPO="createrepo -d --update" | |
# Sign all packages | |
#PACKAGES=`find $REPODIR -name \*.rpm -printf '%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
mesa-dri-filesystem.i686 | |
libgcc.i686 | |
glibc.i686 | |
nss-softokn-freebl.i686 | |
zlib.i686 | |
libstdc++.i686 | |
freetype.i686 | |
nspr.i686 | |
libogg.i686 | |
libjpeg-turbo.i686 |
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
$ curl https://api.github.com | |
{ | |
"user_repositories_url": "/users/{user}/repos{?type,page,per_page,sort}", | |
"hub_url": "/hub", | |
"starred_gists_url": "/gists/starred", | |
"starred_url": "/user/starred{/owner}{/repo}", | |
"current_user_url": "/user", | |
"keys_url": "/user/keys", | |
"user_organizations_url": "/user/orgs", | |
"team_url": "/teams", |
NewerOlder