Skip to content

Instantly share code, notes, and snippets.

View Sar777's full-sized avatar
🎯
Focusing

Arthur Antonevich Sar777

🎯
Focusing
  • Minsk, Republic of Belarus
  • 11:05 (UTC +03:00)
View GitHub Profile
@Sar777
Sar777 / gist:1513716
Created December 23, 2011 09:31
crash all the time
Program received signal SIGSEGV, Segmentation fault.
[Cambiando a Thread 0x7fffdb379700 (LWP 5269)]
0x00007ffff5af5c2d in free () from /lib/libc.so.6
(gdb) info threads
13 Thread 0x7fffd8b74700 (LWP 5274) 0x00007ffff5b5ef23 in epoll_wait () from /lib/libc.so.6
12 Thread 0x7fffd9375700 (LWP 5273) 0x00007ffff5b5ef23 in epoll_wait () from /lib/libc.so.6
11 Thread 0x7fffd9b76700 (LWP 5272) 0x00007ffff5e0a36d in nanosleep () from /lib/libpthread.so.0
10 Thread 0x7fffda377700 (LWP 5271) 0x00007ffff5b2220d in nanosleep () from /lib/libc.so.6

TaskScheduler guide for TrinityCore Scripting

Basic Usage

The Basis usage is like EventMap

#include "TaskScheduler"

TaskScheduler scheduler;
public class AccountObjectSetCheats
{
public bool AutoBattle { get; set; }
public AccountobjectSetCheats Type { get; set; }
public sbyte SlotLockCheat { get; set; }
}
public class AccountObjectGetProfile
{
public string Filename { get; set; }
@Sar777
Sar777 / db-connect-test.php
Created February 2, 2016 21:42 — forked from chales/db-connect-test.php
Script for a quick PHP MySQL DB connection test.
<?php
# Fill our vars and run on cli
# $ php -f db-connect-test.php
$dbname = 'name';
$dbuser = 'user';
$dbpass = 'pass';
$dbhost = 'host';
$connect = mysql_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'");
class AccountObjectSetCheats
{
bool AutoBattle = false;
AccountobjectSetCheats Type;
int8 SlotLockCheat = 0;
};
class AccountObjectGetProfile
{
std::string Filename;
@Sar777
Sar777 / build-boost-libc++
Created September 3, 2016 23:04 — forked from jimporter/build-boost-libc++
Build Boost against libc++
#!/bin/sh
# First, build libc++ See <http://libcxx.llvm.org/>, "Build on Linux using CMake
# and libsupc++." and substitute libsupc++ for libstdc++. NOTE: You'll probably
# need to explicitly link libsupc++ when you compile your own code!
#
# Next, download Boost and extract it somewhere. Set SRC_DIR to that location.
SRC_DIR=$HOME/src/boost_1_55_0
# Set this to be the install prefix. "/usr" is also a good choice.
@Sar777
Sar777 / webpack.server.config.js
Created April 10, 2017 10:37 — forked from madx/webpack.server.config.js
Webpack config for an Express app in Node.js
const path = require("path")
const fs = require("fs")
// -- Webpack configuration --
const config = {}
// Application entry point
config.entry = "./src/server/index.js"
@Sar777
Sar777 / AccountAuthenticator.java
Created June 3, 2017 14:08 — forked from burgalon/AccountAuthenticator.java
Implementing OAuth2 with AccountManager, Retrofit and Dagger
public class AccountAuthenticator extends AbstractAccountAuthenticator {
private final Context context;
@Inject @ClientId String clientId;
@Inject @ClientSecret String clientSecret;
@Inject ApiService apiService;
public AccountAuthenticator(Context context) {
super(context);
@Sar777
Sar777 / Api.java
Created June 8, 2017 15:22 — forked from imminent/Api.java
Call retrying with Retrofit 2.0
package com.example.api;
import java.util.Map;
import retrofit.Call;
import retrofit.http.Body;
import retrofit.http.GET;
import retrofit.http.POST;
public interface Api {
@Sar777
Sar777 / how-to-install-latest-gcc-on-ubuntu-lts.txt
Created July 3, 2017 19:08 — forked from application2000/how-to-install-latest-gcc-on-ubuntu-lts.txt
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \