Skip to content

Instantly share code, notes, and snippets.

@thewisenerd
thewisenerd / 0_reuse_code.js
Created May 15, 2014 17:32
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
Starting recovery on Fri May 16 15:37:11 2014
(UTC)
can't open /dev/tty0: No such file or directory
framebuffer: fd 3 (320 x 480)
PhilZ Touch 5
CWM Base version: v6.0.3.7
I:Build version: 5.15.0 - HTC_Explorer
recovery filesystem table
=========================
0 /tmp ramdisk (null) (null) 0
txt=$(cat $1 | tail -1000)
key=$(curl -d post_data="$txt" "http://hastebin.com/documents" | sed 's/{\|}\|\"\|:\|\(key\)//g')
raw_url="http://hastebin.com/raw/${key}"
txt_url="http://hastebin.com/${key}.txt"
echo $txt_url
// caesar cipher algorithm in C
#define C_CIPHER (-28)
#define pyMod(n, M) (((n % M) + M) % M)
if (data > 64) { // if >= A
if (data < 91) { // if <= Z
data = 'A' + pyMod(((data - 'A') + cipher), 26);
} // <= Z
if (data > 96) { // if >= a
;/*****************************************************************************/
;/* SAM7.S: Startup file for Atmel AT91SAM7 device series */
;/*****************************************************************************/
;/* <<< Use Configuration Wizard in Context Menu >>> */
;/*****************************************************************************/
;/* This file is part of the uVision/ARM development tools. */
;/* Copyright (c) 2005-2006 Keil Software. All rights reserved. */
;/* This software may only be used under the terms of a valid, current, */
;/* end user licence from KEIL for a compatible version of KEIL software */
;/* development tools. Nothing else gives you the right to use this software. */
@thewisenerd
thewisenerd / transfer.fish
Last active December 8, 2015 03:31 — forked from nl5887/transfer.fish
Bash and zsh alias for transfer.sh. Transfers files and directories to transfer.sh.
function transfer
if test (count $argv) -eq 0
echo -e "No arguments specified.\nUsage:\n\techo transfer /tmp/test.md\n\tcat /tmp/test.md | transfer test.md"
return 1
end
## get temporarily filename, output is written to this file show progress can be showed
set tmpfile ( mktemp -t transferXXX )
## upload stdin or file
#! /usr/bin/env bash
#cat /var/log/pacman.log | grep "\[ALPM\] installed" | sed 's/\[ALPM\] installed//g' | sed 's/ \((.\+)\)$//gm' > listPacmanLog
# pacman log - goes all the way back to first install
# get only install not updates
cat /var/log/pacman.log | grep "\[ALPM\] installed" | sed 's/\[ALPM\] installed//g' | sed 's/ \((.\+)\)$//gm' | sed 's/ / : /gm' > listPacmanLog
## todo: skip database backup if not needed
From 517aff265ef68bcd81476dde501ed3157c45d437 Mon Sep 17 00:00:00 2001
From: thewisenerd <[email protected]>
Date: Fri, 17 Jun 2016 08:44:25 +0530
Subject: [PATCH] illuminate/database: add hotfix for multiple query select
---
vendor/illuminate/database/Connection.php | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/vendor/illuminate/database/Connection.php b/vendor/illuminate/database/Connection.php
// ==UserScript==
// @name noPreviews
// @namespace http://github.com/thewisenerd
// @version 0.1
// @description < <
// @author thewisenerd
// @match https://soundcloud.com/stream
// @grant none
// ==/UserScript==
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <inttypes.h>
struct node {
int val;
void *next;
};