Skip to content

Instantly share code, notes, and snippets.

View lights0123's full-sized avatar

Ben Schattinger lights0123

View GitHub Profile
@lights0123
lights0123 / SecurityAddons.pm
Created November 27, 2015 01:59
lights0123's SecurityAddons
package DDG::Goodie::SecurityAddons;
# ABSTRACT: Write an abstract here
# Start at https://duck.co/duckduckhack/goodie_overview if you are new
# to instant answer development
use DDG::Goodie;
zci answer_type => "security_addons";
zci is_cached => 1;
@lights0123
lights0123 / Terminal.command
Created January 10, 2016 21:46
Replaces Terminal with a working copy
cd /tmp
rm -rf TERMINALRESTORE
mkdir TERMINALRESTORE
cd TERMINALRESTORE
curl -ORL http://swcdn.apple.com/content/downloads/21/09/031-20634/8d84o1ky5gn2agnf5kiz9eed134n7y3q4c/RecoveryHDUpdate.pkg
xar -xf RecoveryHDUpdate.pkg
hdiutil attach -nobrowse RecoveryHDMeta.dmg
{
"bridge": {
"name": "Bridge",
"username": "08:E5:AE:7A:77:8F",
"port": 51826,
"pin": "031-45-154"
},
"description": "A pumpkin that shoots Silly String!",
"platforms": [
################################################################################
######################### User configurable parameters #########################
# filename extensions
CEXTS:=c
ASMEXTS:=s S
CXXEXTS:=cpp c++ cc
# probably shouldn't modify these, but you may need them below
ROOT=.
FWDIR:=$(ROOT)/firmware
@lights0123
lights0123 / .clang-format
Created October 28, 2018 17:09
.clang-format
AccessModifierOffset: -4
AlignEscapedNewlinesLeft: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
@lights0123
lights0123 / index.js
Created January 22, 2019 22:55
TP9605 Datalogger
const btSerial = new (require('bluetooth-serial-port')).BluetoothSerialPort();
const readline = require('readline');
const chalk = require('chalk');
let start = new Date();
let data = [['time', 'temp']];
let go = false;
function log(...data){
if(go) console.log(chalk.green(...data));
else console.log(chalk.yellow(...data));
format:
.Lfunc_begin63:
.loc 20 28 0 is_stmt 1
.fnstart
.cfi_startproc
.save {r4, r5, r6, r7, r8, r9, r11, lr}
push {r4, r5, r6, r7, r8, r9, r11, lr}
.cfi_def_cfa_offset 32
.cfi_offset lr, -4
.cfi_offset r11, -8
use alloc::boxed::Box;
use core::ptr::null_mut;
use cty::c_void;
use num_derive::FromPrimitive;
use num_traits::FromPrimitive;
use pros_sys::lv_obj_t;
use crate::lvgl::{LVGLObject, Object};
@lights0123
lights0123 / HighlightedCode.vue
Last active August 17, 2020 06:00
vue-highlight with line numbers
<template>
<pre><code :style="{ tabSize, fontSize: `${fontSize}px` }" :class="['hljs', lang]" v-html="formattedCode"></code></pre>
</template>
<script lang="ts">
import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
import hljs from 'highlight.js';
import highlightLines from './highlightLines';
@Component
import java.util.*;
import java.util.stream.Collectors;
public class RelearnJava {
public static void main(String[] args) {
{
Scanner scanner = new Scanner(System.in);
String s = scanner.next();
int a = scanner.nextInt();
long l = scanner.nextLong();