Skip to content

Instantly share code, notes, and snippets.

Linus Styrén Linkaan

Block or report user

Report or block Linkaan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View hello.c
#include <stdio.h>
int main(void) {
printf("Hello, World!\n");
return 0;
}
View picam
#!/bin/sh
# Try to bring picam up when an interface comes up.
# Don't bother to do anything for lo.
if [ "$IFACE" = lo ]; then
exit 0
fi
# Only run from ifup.
if [ "$MODE" != start ]; then
View test.txt
avconv -i tcp://127.0.0.1:8181?listen -c:v copy -c:a aac -strict -2 -ar 44100 -ab 40000 -f flv rtmp://1.21550888.fme.ustream.tv/ustreamVideo/21550888/mPqsDH2dWMqVmSptpfRytBGeETLc3DxQ
View ultrasonicsensor_motion.ino
#include <NewPing.h>
#define MAX_TIME 17202
#define TRIGGER_PIN 10 // Arduino pin tied to trigger pin on ping sensor.
#define ECHO_PIN 9 // Arduino pin tied to echo pin on ping sensor.
#define MAX_DISTANCE 200 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm.
NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance.
View reversestring.cpp
#include <iostream>
#include <cstring>
#include <vector>
#include <string>
int main ()
{
std::vector<std::string> tokens;
std::vector<std::string>::iterator it;
std::string str ("homework! my do Please");
@Linkaan
Linkaan / precompute.c
Created Oct 19, 2015
Redirect standard output to table.h and include that in the main program.
View precompute.c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define MAX 1000000
void permute(unsigned int **result, char *a, int l, int r, int *len);
int main() {
int i, k, j, len;
View npm-debug.log
58029 silly gunzTarPerm extractEntry node_modules/fstream-npm/.npmignore
58030 silly gunzTarPerm extractEntry node_modules/fstream-npm/README.md
58031 silly gunzTarPerm extractEntry node_modules/fstream-npm/LICENSE
58032 silly gunzTarPerm extractEntry node_modules/fstream-npm/fstream-npm.js
58033 silly gunzTarPerm extractEntry node_modules/fstream-npm/example/bundle.js
58034 silly gunzTarPerm extractEntry node_modules/fstream-npm/example/dir-tar.js
58035 silly gunzTarPerm extractEntry node_modules/fstream-npm/example/dir.js
58036 silly gunzTarPerm extractEntry node_modules/fstream-npm/example/example.js
58037 silly gunzTarPerm extractEntry node_modules/fstream-npm/example/ig-tar.js
58038 silly gunzTarPerm extractEntry node_modules/fstream-npm/example/tar.js
View limit.sh
set limit = 100000
while true
do
set fsize = `du -b "$(ls | tail -1)" | cut -f 1`
if test $fsize -gt $limit
then
touch hooks/stop_record
touch hooks/start_record
fi
sleep 1
You can’t perform that action at this time.