This file contains 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 | |
$data = array( | |
"content" => "Pickle Rick motherfuckers!", | |
); | |
$ch = curl_init("https://discordapp.com/api/webhooks/<WEBHOOK_ID>/<TOKEN>"); | |
curl_setopt($ch, CURLOPT_POST, 1); | |
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json')); | |
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); | |
curl_setopt($ch, CURLOPT_HEADER, 0); |
This file contains 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
# diskutil list | |
/dev/disk0 (internal, physical): | |
#: TYPE NAME SIZE IDENTIFIER | |
0: GUID_partition_scheme *121.3 GB disk0 | |
1: EFI EFI 209.7 MB disk0s1 | |
2: Apple_CoreStorage Macintosh HD 121.0 GB disk0s2 | |
3: Apple_Boot Boot OS X 134.2 MB disk0s3 | |
/dev/disk1 (internal, physical): | |
#: TYPE NAME SIZE IDENTIFIER |
This file contains 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
#!/usr/local/bin/ruby | |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# encoding: UTF-8 | |
# | |
# Get all members: | |
# curl "localhost:3737/api/members" | |
# | |
# Get members alive: | |
# curl "localhost:3737/api/members?status=alive" |
This file contains 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
input { | |
file { | |
type => "php-error" | |
path => "/var/www/error_log" | |
sincedb_path => "/opt/logstash/sincedb-access" | |
} | |
} |
This file contains 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
ZSH=$HOME/.oh-my-zsh | |
# Path to your oh-my-zsh configuration. | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="robbyrussell" |
This file contains 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
{ | |
"caret_extra_width": 1, | |
"caret_style": "phase", | |
"close_windows_when_empty": false, | |
"color_scheme": "Packages/Predawn/predawn.tmTheme", | |
"copy_with_empty_selection": false, | |
"detect_indentation": true, | |
"detect_slow_plugins": false, | |
"drag_text": false, | |
"draw_minimap_border": true, |
This file contains 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
# try: | |
grub-mkconfig -o /boot/grub/grub.cfg | |
# output error: | |
Generating grub configuration file ... | |
Found linux image: /boot/vmlinuz-linux-ck | |
Found initrd image: /boot/initramfs-linux-ck.img | |
Found Windows 8 (loader) on /dev/sda1 | |
error: out of memory. | |
error: syntax error. |
This file contains 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 | |
$wysiwyg = "<p><b>test</b></p><p><i>test</i></p><p><strike>test</strike></p><p><br></p><p><ul><li>test</li></ul></p><p><ol><li>test</li></ol></p>"; | |
$html = array('<b>', '</b>', '<i>', '</i>', '<p>', '</p>', '<br>', '<ul>', '</ul>', '<li>', '</li>', '<ol>', '</ol>', '<strike>', '</strike>'); | |
$markdown = array('**', '**', '*', '*', '', PHP_EOL, PHP_EOL, '', '', "* ", '', '', '', '~~', '~~'); | |
echo str_replace($html, $markdown, $wysiwyg); | |
/** |
This file contains 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
#!/bin/bash | |
# Getting the bzr plugin | |
mkdir -p ~/.bazaar/plugins | |
cd ~/.bazaar/plugins | |
bzr branch lp:~lyda.google/bzr-fastimport/mysql-export-fix fastimport | |
# Migration | |
git init ~/project.git | |
cd ~/project.git |
This file contains 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
#!/bin/bash | |
# Once you've confirmed the bug, switch to the fixed version do the following: | |
cd ~/.bazaar/plugins | |
# Instead of removing it, you can also just move it somewhere not visible to bzr. | |
rm -rf fastimport | |
bzr branch lp:~lyda.google/bzr-fastimport/mysql-export-fix fastimport | |
# try again |
NewerOlder