run
break <func name>
, always works,break 5
only works if you've compiled with debug symbols (you can do this withgcc -g blah.c
.list
Show source code if build with debug info.disassemble main
Show asm for the main function.x
Examine memory, should bex/[number of units to display]<format>[unit size] <mem addr>
<format>
can bex
(hex),o
(octal),u
(unsigned int),i
(instruction),s
(string, here we don't need to worry about size, it will just show until it meets a\0
)<mem addr>
can be0x8048384
, or$rip
or$rip+8
orsome_var
if there's a variable called that and we compiled with debug info.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Find the element | |
let scrollableElement = document.querySelector("div[aria-label='Timeline: Retweeted by']").parentElement.parentElement.parentElement; | |
// Get the height | |
let elementHeight = scrollableElement.scrollHeight; | |
// Scroll through and grab all divs each time | |
async function grabthem() { | |
let scrolls = Array.from(Array(Math.floor(elementHeight/500)).keys()).map(o => o * 500); | |
let retweeters = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-1 "['<Primary><Alt>1']" | |
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-2 "['<Primary><Alt>2']" | |
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-3 "['<Primary><Alt>3']" | |
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-4 "['<Primary><Alt>4']" | |
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-5 "['<Primary><Alt>5']" | |
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-6 "['<Primary><Alt>6']" | |
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-7 "['<Primary><Alt>7']" | |
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-8 "['<Primary><Alt>8']" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
var setValue = function (row, col, value) { | |
records[row][col] = value; | |
// TESTING ONLY | |
var td = testTable.querySelector('tr:nth-child(' + (row + 1) + ') > td:nth-child(' + (col + 1) + ')'); | |
td.innerText = value; | |
// EOF TESTING | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var rows = document.querySelectorAll("table div table > tbody tr"); | |
var records = []; | |
for (var i = 0; i < rows.length; i++) { | |
var row = rows[i]; | |
var cells = row.querySelectorAll("td"); | |
cells.forEach((o, j) => { | |
// Put in the forward rows data | |
if (o.rowSpan > 1) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Plop this into chrome dev console, once it's done the var tickets will be populated with ticket details. | |
* | |
* Handy if you need to get a bunch of jira tickets to offline versions for reading on a plane! | |
*/ | |
var tickets = []; | |
var cards = document.querySelectorAll(".ghx-backlog-card"); | |
var cardsLength = cards.length; | |
var currentCard = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Seatfrog\WebservicesBundle\Command; | |
use Doctrine\Common\Collections\ArrayCollection; | |
use Doctrine\ORM\Tools\SchemaTool; | |
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
function getDepth(ArrayCollection $set, $currentItem, $currentDepth) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* String extension to validate credit card number. | |
* Automatically strips any whitespace from the string but otherwise the string | |
* should not contain and non-numeric characters. | |
*/ | |
extension String { | |
func validateLuhn() -> Bool { | |
let nsStringVersionNoSpaces = (self.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceCharacterSet()) as NSString) | |
if (self.rangeOfString("^[0-9]+$", options: .RegularExpressionSearch) == nil) { | |
return false |