Skip to content

Instantly share code, notes, and snippets.

💯
just vibing, you know

Artem Golovin awave1

💯
just vibing, you know
Block or report user

Report or block awave1

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 hie-build.log
shake > configure
shake > Configuring shake-0.18.3...
shake > build
shake > Preprocessing library for shake-0.18.3..
shake > Building library for shake-0.18.3..
shake > [ 1 of 73] Compiling Development.Ninja.Env
shake > [ 2 of 73] Compiling Development.Ninja.Type
shake > [ 3 of 73] Compiling Development.Ninja.Lexer
shake > [ 4 of 73] Compiling Development.Ninja.Parse
shake > [ 5 of 73] Compiling Development.Shake.Classes
View Main.java
package reflection;
import java.lang.reflect.*;
import java.lang.Class;
import java.lang.Object;
import data.*;
import java.io.PrintStream;
import static java.lang.System.out;
/**
* Do the following using reflection (inside the `main`)
View sum.js
function sum(arr, i, j) {
return arr.slice(i, j).reduce((prev, current) => current += prev, 0);
}
console.log(sum([1, 2, 3, 4, 5], 1, 3));
View my.shim.catalina.captivenetworkassistant.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" \
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>my.shim.catalina.captivenetworkassistant.plist</string>
<key>LowPriorityIO</key>
<true/>
<key>ProgramArguments</key>
View cpsc501final.md

CPSC 501: Final Review

Q1: Refactoring

  • Code smell (from listing, off name)
  • Refactoring (official name, from listing)
  • Make 4 changes
    • has to be 4 separate changes
    • don’t change all at once
  • Same list of smells and refactoring are given
View weather.sample.json
[{"topic":"weather","data":[-29.85092273691336]},{"topic":"weather","data":[34.127802211757185]},{"topic":"weather","data":[39.73724969905507]},{"topic":"weather","data":[17.708340534620127]},{"topic":"weather","data":[43.671826418041306]},{"topic":"weather","data":[-8.885247606175724]},{"topic":"weather","data":[-14.288513120383419]},{"topic":"weather","data":[-14.938803769871123]},{"topic":"weather","data":[-29.553742810153057]},{"topic":"weather","data":[33.03236732854032]},{"topic":"weather","data":[20.4762743473849]},{"topic":"weather","data":[-9.955597861605064]},{"topic":"weather","data":[7.693499175468759]},{"topic":"weather","data":[18.40701151261424]},{"topic":"weather","data":[-26.311356109832218]},{"topic":"weather","data":[38.12609281914723]},{"topic":"weather","data":[12.558345064581722]},{"topic":"weather","data":[-13.631466535459243]},{"topic":"weather","data":[-19.823479889164396]},{"topic":"weather","data":[-26.420139545205586]},{"topic":"weather","data":[-22.10232779768183]},{"topic":"weath
View generate.js
#!/usr/bin/env node
const fs = require('fs');
/**
* Simple script to generate random data for our mongodb
* example:
* node generate.js <topic_name> <min> <max> <numEntries>
*
* # or
View AndroidManifest.xml
<activity ...>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<!--
The line below specifies where to display the application.
In the regular application, the value would be "android.intent.category.MAIN"
-->
<category android:name="android.intent.category.INFO"/>
</intent-filter>
</activity>
View of.py
#!/usr/bin/env python2
import struct
pad = 'a' * 96
addr = struct.pack('L', 0xreturn_addr + 50)
nops = '\x90' * 100
shellcode = "copy it here"
print pad + addr + nops + shellcode
View UIColor+HexString.m
// UIColor+HexString.h
#import <UIKit/UIColor.h>
NS_ASSUME_NONNULL_BEGIN
@interface UIColor (HexString)
+ (UIColor *) colorWithHexString: (NSString *) hexString;
+ (CGFloat) colorComponentFrom: (NSString *) string start: (NSUInteger) start length: (NSUInteger) length;
You can’t perform that action at this time.