Skip to content

Instantly share code, notes, and snippets.

Avatar

Tim Potze ikkentim

View GitHub Profile
View gist:4fd26e12e3d1c2ecd582186ca35c1402
#include "optiboot.h"
#include <avr/pgmspace.h>
#define MEMADDR 0x20000
void setup() {
int i;
uint8_t c;
uint16_t w;
uint8_t ram_buffer[SPM_PAGESIZE];
View flash_program_atmega2560_test.ino
#include "optiboot.h"
#include <avr/pgmspace.h>
#define MEMADDR 0x10000
void setup() {
int i;
uint8_t c;
uint16_t w;
uint8_t ram_buffer[SPM_PAGESIZE];
View youtubetest.sh
#!/bin/bash
videos=$(grep -cve '^\s*$' input.txt)
echo "Total of $videos videos"
i=1
while read video; do
if [[ $(curl -s http://www.youtube.com/oembed\?url\=https://www.youtube.com/watch\?v\=$(echo $video)\&format\=json) = "Not Found" ]]; then
echo "$i: $video is bad"
echo "$video" >> bad.txt
else
@ikkentim
ikkentim / natives.cs
Last active Oct 7, 2016
sampsharp natives
View natives.cs
private class SomeNativeObject : NativeObjectSingleton<SomeNativeObject>
{
[NativeMethod("OtherNativeName")] // you can remove the parameter if FooMethod is the name of the method
public virtual int FooMethod() // must be virtual, a proxy class is generated which will implement this method
{
// lets throw this exception to indicate that the native has not properly been loaded if it has been thrown.
throw new NativeNotImplementedException();
}
[NativeMethod]
View Makefile
me:
@me=`whoami` ; \
if test $$me != "root" ; \
then \
echo 'What? Make it yourself.'; \
exit 1; \
fi
a:
@printf ''
sandwich:
View steamapps.cs
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication7
{
View gist:44090949c7e58995694a
{
"version":"backward",
"download_url":"https:\/\/client.parkitectnexus.com\/download",
"Windows": {
"version":"forward",
"download_url":"https:\/\/client.parkitectnexus.com\/download",
}
"MacOSX": {
"version":"forward",
"download_url":"https:\/\/client.parkitectnexus.com\/download",
View gist:f7062c11e29396b1aa7d
[15-11-26 22:09:54] Info: Compiling Building Mod by Kenney to bin/build-151126220954257.dll...
[15-11-26 22:09:54] Info: Compiling from `Custom Scenery.csproj`.
[15-11-26 22:09:54] Error: Directory '/Applications/Parkitect.app/Parkitect_Data\Managed' not found.
[15-11-26 22:11:48] Info: Compiling Building Mod by Kenney to bin/build-151126221148355.dll...
[15-11-26 22:11:48] Info: Compiling from `Custom Scenery.csproj`.
[15-11-26 22:11:48] Error: Failed to resolve referenced assembly 'Assembly-CSharp'
[15-11-26 22:15:08] Info: Compiling Building Mod by Kenney to bin/build-151126221508748.dll...
[15-11-26 22:15:08] Info: Compiling from `Custom Scenery.csproj`.
[15-11-26 22:15:14] Info: Resolved assembly reference `Assembly-CSharp` to `/Applications/Parkitect.app/Contents/Resources/Data/Managed/Assembly-CSharp.dll`
[15-11-26 22:15:14] Info: Resolved assembly reference `Microsoft.CSharp` to `Microsoft.CSharp.dll`
@ikkentim
ikkentim / Program.cs
Created Sep 17, 2015
List logitech devices connected, quick and dirty written
View Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace TestList
{
internal static class LgLcd
View FuzzyLogic.cs
using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace FuzzyLogic
{
internal class Program
{
private static void Main(string[] args)
{