\d
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 count, n, t1=0, t2=1, display=0; | |
printf("Enter number of terms: "); | |
scanf("%d",&n); | |
printf("Fibonacci Series: %d %d ", t1, t2); /* Displaying first two terms */ | |
count=2; /* count=2 because first two terms are already displayed. */ | |
while (count<n) | |
{ |
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
-- | |
-- open currently active Chrome tab with Safari | |
-- forked from https://gist.github.com/3151932 and https://gist.github.com/3153606 | |
-- | |
property theURL : "" | |
tell application "Google Chrome" | |
set theURL to URL of active tab of window 0 | |
end tell | |
if appIsRunning("Safari") then |
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
all: vtwebd | |
request.o: request.c | |
gcc -g -O2 -c request.c | |
vtwebd.o: main.c | |
gcc -pthread -g -O2 -c main.c | |
vtwebd: vtwebd.o request.o | |
gcc -pthread -g -o vtwebd main.o request.o |
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 in console of dev tools in browser to make all text on rendered page editable (but retains style etc) */ | |
javascript:document.body.contentEditable='true'; document.designMode='on'; void 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
#!/usr/bin/python | |
# Title: Reddit Data Mining Script | |
# Authors: Clay McLeod | |
# Description: This script mines JSON data | |
# from the Reddit front page and stores it | |
# as a CSV file for analysis. | |
# Section: Python | |
# Subsection: Data Science | |
want=["domain", "subreddit", "subreddit_id" "id", "author", "score", "over_18", "downs", "created_utc", "ups", "num_comments"] |
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/env bash | |
# Connect to the server.. | |
# ssh username@server_ip | |
mkdir ~/.local; | |
# Download source and build libevent | |
cd /tmp; | |
wget https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz; | |
tar xvfz libevent-2.1.8-stable.tar.gz; |
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
# For use in Chef: | |
# Adds a command: git-pull-recursive | |
file "/usr/local/bin/git-pull-recursive" do | |
owner "root" | |
group "root" | |
mode "0755" | |
action :create | |
content 'find . -type d -name .git -exec sh -c "cd \"{}\"/../ && pwd && git pull" \;' | |
end |
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
# Replace REMOTE_NAME with your remote name (e.g. origin) | |
git branch -r | grep REMOTE_NAME/ | grep -v 'master$' | grep -v HEAD| cut -d/ -f2 | while read line; do git push REMOTE_NAME :$line; done; |
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
license: gpl-3.0 |
OlderNewer