Skip to content

Instantly share code, notes, and snippets.

@ngharo
ngharo / docx-to-pdf.ps1
Created October 11, 2016 19:13
bulk convert folder of docx files to pdfs
# Acquire a list of DOCX files in a folder
$Files=GET-CHLDITEM 'C:\FooFolder\*.DOCX'
Foreach ($File in $Files) {
# open a Word document, filename from the directory
$Doc=$Word.Documents.Open($File.fullname)
# Swap out DOCX with PDF in the Filename
$Name=($Doc.Fullname).replace("docx","pdf")

Keybase proof

I hereby claim:

  • I am ngharo on github.
  • I am ngharo (https://keybase.io/ngharo) on keybase.
  • I have a public key ASBAEeI526avbfInjn0MOIQtQ836lQzP14UEBiHZ80gnmwo

To claim this, I am signing this object:

@simonjhall can you help me figure out the best approach?
I'm building my own distro using the LFS book. I patched glibc with your copies-and-fills assembler applied to the following files of glibc-2.18:
ports/sysdeps/arm/memcpy.S | 677 ++++++++++++++++++++++----------------------
ports/sysdeps/arm/memset.S | 183 +++++++-----
2 files changed, 440 insertions(+), 420 deletions(-)
During compilation of glibc, I error out with the following errors:
#include <stdlib.h>
#include <stdio.h>
int add(int x, int y) {
int z = 10;
z = x + y;
return z;
}
main (int argc, char **argv) {
@ngharo
ngharo / gist:2914037
Created June 12, 2012 02:36
Arduino HID
#include "UsbKeyboard.h"
#define BUTTON_PIN 12
#define BYPASS_TIMER_ISR 1
void setup() {
pinMode(BUTTON_PIN, INPUT);
digitalWrite(BUTTON_PIN, HIGH);
#if BYPASS_TIMER_ISR
TIMSK0&=!(1 << TOIE0);
#endif
}
@ngharo
ngharo / gist:2914030
Created June 12, 2012 02:33
Arduino HID
#include "UsbKeyboard.h"
#define BUTTON_PIN 12
#define BYPASS_TIMER_ISR 1
void setup() {
pinMode(BUTTON_PIN, INPUT);
digitalWrite(BUTTON_PIN, HIGH);
#if BYPASS_TIMER_ISR
TIMSK0&=!(1 << TOIE0);
#endif
}
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
int main(int argc, char **argv)
{
int fd;
if(argc < 2) {
#include < IRremote.h >
int IRRECV = 11;
int READYLED = 9;
int PLAYBUTTON = 5;
int IRLED = 3;
int RESETBUTTON = 7;
int PLAYLED = 2;
decode_results results;
IRrecv irrecv(IRRECV);
foobar